title: Merge similar object keys jquery
body: <p>I have similar object keys how can i merge them.</p>
  
  <pre><code>device_id_1:"1"
  device_id_2:"2"
  device_id_3:"100"
  device_id_4:"10 000"
  </code></pre>
  
  <p>I could have more then 4 keys or less. Any idea how to merge/combine object keys with similar name ?</p>
  
  <p>I need to combine all <strong>device_id_X</strong> and merge as one key <strong>device_id</strong></p>
  
  <p>Here i collect all input data and save to this object:</p>
  
  <pre><code>var data = $('#form_id').serializeArray();
  var obj = {};
  for (i = 0, l = data.length; i &lt; l; i++) {
      obj[data[i].name] = data[i].value;
  }
  </code></pre>
  
  <p>The <strong>obj</strong>  returns the object keys witch i want to merge/combine.</p>