title: jQuery change values of any key of an array of objects
body: <p>I have an array imported via AJAX.
  I want to create a new array based on the original one and scan through the whole new array in order to clean the value WHATEVER the key associated to it.</p>
  
  <p>The imported dataset looks like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>[
      {id:"1", color:"red_blue", height:"100_200" },
      {id:"2", color:"green", height:"100_20" },
      {id:"3", color:"orange_yellow", height:"50" }
  ]
  </code></pre>
  
  <p>And the jQuery process looks like this</p>
  
  <pre class="lang-js prettyprint-override"><code>dataSet = JSON.parse(response);
  
  // create a new array based on the imported array
  var row = 0;
  
  $.each(dataSet, function(key, value) {
      cleanDataSet.push(dataSet[row]);
      row++;
  });
  
  // clean the new array
  var row = 0;
  
  // Go through each row of the array
  $.each(cleanDataSet, function(key, value) {
  
      // Go through each key and value of this array
      $.each(cleanDataSet[row], function(key, value) {
          var myVariable = thisValueWhateverTheKey.split('_');
  
          // if a split is detected in the value
          if (myVariable[1]) {
              // Update the value 
              thisValueWhateverTheKey = myVariable[0];
          }
          row++;
      });
  });
  
  console.log(cleanDataSet)
  </code></pre>
  
  <p>The <code>"thisValueWhateverTheKey"</code> part is obviously the one I can't figure out.
  It's easy when I target the values of a specific key (I would use <code>"value.nameofmykey"</code> but not that much when I target any value of any key. "value" alone won't work.</p>