This can be used in Javascript. You need to parse JSON when your data is in String format and you will get it from the server side.
The purpose of JSON.parse is to convert to a Javascipt Object Designation to use it. For instance,
var str = "{"a":1,"b":2}"; var obj = JSON.parse(str);
MDN Link
source share