title: Pushing data into an array of objects
body: <p>Alright, I've got this blank array of objects. 
  I am dynamically finding every node in a web page and each node is going to have it's own object and properties.
  I need a way to throw the values I need into their respective objects property</p>
  
  <p>So, for example, I find the <code>body</code> node. I now have a special little object for this node. I need to throw pretty much everything about this little guy into his object's properties.</p>
  
  <p>So I pretty much need it to render like this:</p>
  
  <p>Turning this:</p>
  
  <pre><code>&lt;html&gt;
      &lt;body style="margin:0; padding:0;" title="My Title"&gt;
          &lt;p&gt;some text&lt;/p&gt;
          &lt;div class="wrapper"&gt;&lt;/div&gt;
          &lt;footer&gt;&lt;/footer&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Into this:</p>
  
  <pre><code>this.nodesInfo = [ // All nodes in the page's DOM
      {
          type: 'body', // ex: body, section, aside, div, etc.
          id: 'myID', // the Id of that element
          class: ['myClass1', 'myClass2'], // the class/class' of that element
          depth: '2', // the level in the page's DOM in which that element sits, this will be an integer
          parent: 'html', // that elements direct parent Node 
          children:['div.wrapper', 'p', 'footer'], // any child Nodes that, that element may be a parent to
          text: '', // the text inside that element if any exists
          attributes: ["style=margin:0; padding:0;", "title='My Title'"] // all attributes of this node
      }
  ];
  </code></pre>
  
  <p>It would of course cycle through each node it discovered and do this for each node accordingly, until it ran out of nodes.</p>
  
  <p>The class, children, and attributes properties are arrays for the simple possibility of multiples of any of these. Everything else is just a string since a node can't have more than one ID, title, or direct parent tag.</p>
  
  <p>If a node does not contain some of these properties then that property would remain blank/null/undefined.</p>
  
  <hr>
  
  <p>My question is simple. Is this possible, if not would I instead have to create each object individually and the push them into my <code>nodesInfo</code> array?</p>
  
  <p>I think the easiest way to go about this would be making an object of each Node and then pushing them all (once they are all created) into an array.</p>