Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
Print just the value of one json key response with JavaScript

I don't know almost anything about JavaScript, and I can't stop to study it now... but I need a basic code to print just one line of a http response request (JSON:GET method). For example, I have the URL "http://myurl.com.br", that returns me the following JSON response:

    {
"token": {
    "token": "randomtoken",
    "result": 1,
    "resultCode": "2",
    "requestId": "3"
}}

What I need is, when I call the script in JavaScript, it have to return me just: "randomtoken".

Another example, I have this python script that returns me the same:

import requests as req

resp = req.get("http://myurl.com.br")
token_key = resp.json()['token']['token']
print(token_key)

How I could do the same, but in JavaScript?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!