I have a string like
"Something has happened {\"prop1\":{\"name\":\"foo\"}}"
and I would like to parse out the JSON so that I can format the string. Such as:
Something has happened
{
"prop1":{
"name":"foo"
}
}
In JavaScript, what would be a good way to accomplish this.
There can be multiple object in the string and also the object will not be known it could contain many nested objects or arrays. Thanks in advance.