1var jsonPerson = '{"first_name":"billy", "age":23}';
2var personObject = JSON.parse(jsonPerson); //parse json string into JS object
1 var str = '[{"UserName":"xxx","Rolename":"yyy"}]'; // your response in a string
2 var parsed = JSON.parse(str); // an *array* that contains the user
3 var user = parsed[0]; // a simple user
4 console.log(user.UserName); // you'll get xxx
5 console.log(user.Rolename); // you'll get yyy