How can i read json data

Lakshmi53
Tera Contributor
  {
  "jobs": [
        {
                "details": {
                "code""123"
            },      
           "userinfo": [
                {
                    "user""test"
                },
                {
                    "user""abc"
                }
            ]
            }
]
}
above is the sample JSON i have. using above json how can i get user details.
 
5 REPLIES 5

i written like this in API but not working. i need to map users with different variables.

 

    var details = request.body.data;
    details.jobs.forEach(function(job) {
        job.userinfo.forEach(function(user) {
            gs.info('123456: ' +user.user);
        });
    });