title: iterate array and add new field to each nested array
body: <p>I have a JSON array from an AJAX call that looks like the following: </p>
  
  <pre><code>[{field1: "Something", field2: "Other"},{field1: "Something", field2: "Other"},{field1: "Something", field2: "Other"}]
  </code></pre>
  
  <p>I want to use this data on DataTables, but I would like to add a text input to each row in the table based on field Title (Group). Therefore, I would like to add this column to each array, something like: </p>
  
  <pre><code>[{field1: "Something", field2: "Other", Group: "Text Input"},{field1: "Something", field2: "Other", Group: "Text Input"},{field1: "Something", field2: "Other", Group: "Text Input"}]
  </code></pre>
  
  <p>So that DataTables will add a text input on each new row. How is this achievable using jQuery or javascript? </p>
  
  <p>I have tried by iterating trough the array: </p>
  
  <pre><code>var i, j, arrayItem;
  for (i = 0; i &lt; array.length; ++i) {
      arrayItem = array[i];
      arrayItem.push({Group: "Text Input"});
  }
  </code></pre>
  
  <p>But this shows error, <code>"Push" is not a function</code>. As you can see, the JSON array has no explicit index for each nested array, and each array is not unique.</p>