javascript json decode
var jsonPerson = '{"first_name":"billy", "age":23}';
var personObject = JSON.parse(jsonPerson); //parse json string into JS object
                                
                            javascript json decode
var jsonPerson = '{"first_name":"billy", "age":23}';
var personObject = JSON.parse(jsonPerson); //parse json string into JS object
                                
                            Working with JSON in Node.js
/*
    This code comes from Vincent Lab
    And it has a video version linked here: https://www.youtube.com/watch?v=dR--FnRoYh0
*/
// Import dependencies
const fs = require("fs");
// Load the config
const config = require("./config.json");
// Show the config
console.log(config);
// Modify the config
config.apiKey = "gj3j#4K321hIO"; // 2i3f2399g23y43q9o
// Saved the config
fs.writeFile("./config.json", JSON.stringify(config), function (err, file) {
    if (err) throw err;
    console.log("Saved!");
});
                                
                            json parse returns object
var str = '[{"UserName":"xxx","Rolename":"yyy"}]'; // your response in a string
    var parsed = JSON.parse(str); // an *array* that contains the user
    var user = parsed[0];         // a simple user
    console.log(user.UserName);   // you'll get xxx
    console.log(user.Rolename);   // you'll get yyy
                                
                            Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us