C
C
Concordeair2022-04-21 01:19:14
JavaScript
Concordeair, 2022-04-21 01:19:14

How to use the result parsed from the site?

There is a code

const request = require('request');

const headers = {
    'accept': '*/*'
};

const options = {
    url: 'URL',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
      const jsonArr = JSON.parse(body);
  //    console.log(jsonArr);
      console.log(jsonArr.Revenue);
    }
}

request(options, callback);


Which produces the result:
214970
How do I bind the result, namely 214970 , for further use in the code?

I'm just learning, unfortunately I can't figure it out myself :(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mors Clamor, 2022-04-21
@66demon666

The answer is in the output code of this number itself. Analyze which lines display the result, play around, and understand exactly where the answer is.
Telling you in this case is not worth it for your own good.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question