I have dynamic data coming into my website like this:
[{
"itemOne": {
"url": "www",
"name": "Bob"
},
"itemTwo": {
"url": "www",
"name": "fred"
}
}]
Using jQuery or Javascript, I would like to turn this data into JSON, so it would be structured like this:
"products": {
"itemOne": {
"url": pageUrl,
"name": productName
},
"itemTwo": {
"url": pageUrl,
"name": productName,
}
}
Is this possible? If so, how would I go about it?