Turn Array objects into JSON using javascript or jquery : <p>I have dynamic data coming into my website like this:</p>

<pre><code>[{
  "itemOne": { 
     "url": "www",
     "name": "Bob" 
  },
  "itemTwo": {
     "url": "www",
     "name": "fred"
  }
}]
</code></pre>

<p>Using jQuery or Javascript, I would like to turn this data into JSON, so it would be structured like this:</p>

<pre><code>"products": {
    "itemOne": {
       "url": pageUrl,
       "name": productName
    },
    "itemTwo": {
       "url": pageUrl,
       "name": productName,
    }
}
</code></pre>

<p>Is this possible? If so, how would I go about it?</p>
