Although this question may seem like a duplicate, I have not been able to find the answer. My issue is with stringifying a JavaScript object that contains JSON strings as values.
Here is an example:
var obj = {id:1, options:"{\"code\":3,\"type\":\"AES\"}"};
As you can see, the value for key 'options' is a JSON string. I am looking for a way to stringify the object 'obj' without double stringifying the inner JSON string.
Is there a more elegant solution for this problem, rather than parsing each value with JSON.stringify and then stringifying the object?