console.log( JSON.stringify(original art, undefined, 2) ); //logs: { "items": [ { "item":{ "name": "digital slr camera", "price": "1093" }, "quantity": 1 } ] } site:stackoverflow.com code example
Example: console.log( JSON.stringify(original art, undefined, 2) ); //logs: { "items": [ { "item":{ "name": "digital slr camera", "price": "1093" }, "quantity": 1 } ] } site:stackoverflow.com
console.log(
JSON.stringify(originalCart, undefined, 2)
);
{
"items": [
{
"item":{
"name": "digital slr camera",
"price": "1093"
},
"quantity": 1
}
]
}