[Objet] Node JS Sortie
JScopyconsole.log(JSON.stringify(obj, null, 2))
Noob Learner
JScopyconsole.log(JSON.stringify(obj, null, 2))
var request = require('request');
request('http://ip-api.com/json', function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(response.body); // Prints the JSON object
var object = JSON.parse(body);
console.log(object['country']) // Prints the country value from the JSON object
}
});