title: how do i add a parent key to json object using javascript
body: <p>I'm trying to add a wrapping key to an entire JSON object with javascript and having some issues. For example:</p>
  
  <pre><code>var obj = { "name" : "Bob", "city" : "Detroit", "state" : "MI" };
  </code></pre>
  
  <p>I want to add a parent key to this so it would eventually output as:</p>
  
  <pre><code>{ "personalization" : { "name" : "Bob", "city" : "Detroit", "state" : "MI" } }
  </code></pre>
  
  <p>Since the var obj is dynamically built I thought of doing something like this, but it doesn't like having a var in there:</p>
  
  <pre><code>var obj = { "name" : "Bob", "city" : "Detroit", "state" : "MI" };
  var obj2 = { "personalization" : obj };
  </code></pre>