title: nesting object within another array
body: <p>i have an array and an object.</p>
  
  <pre><code>var myObj = { "abc": 200, "xyz": 300};
  vay myArray = ["one", "two"]
  </code></pre>
  
  <p>i want to next the values of myObj inside "one".</p>
  
  <p>so myArray[0] would return object data-</p>
  
  <p>the console.log(myArray) would look something like.</p>
  
  <pre><code>-"one"
      *Object
              *abc:200
              *xyz:300
  -"two"
  </code></pre>
  
  <p>i tried using push to add myObj to myArray[0], but it did not work.
  Any suggestions.</p>
  
  <p><strong>Update:</strong><br>
  My code looks like this now, maybe this will help me ask correctly:</p>
  
  <pre><code>var allData = {
  user1:[userData]}
  </code></pre>
  
  <p>this runs each time a function is called. </p>
  
  <p>userData the first time is ex: <code>{name:bob, id:123}</code> and <code>{name:dave, id:456}</code> the second time the function runs.</p>
  
  <p>but if i do a <code>console.log{allData)</code>, i only see the last <code>userDat</code> objecta. i would like it to add on to the user1 each time i use the function so that i could essentially do the following <code>allData.user1[1].name;</code> and get "dave"</p>