title: Merging JSON objects with same key together
body: <p>I need to merge JSON objects with same key into one so that it gets an object or array(doesn't matter if result is an object or array) which holds the key and an array for the values</p>
  
  <p>example JSON object:</p>
  
  <pre><code>[{
      "meine_frage": "hier kommt die antwort",
      "ne_andere_frage": "ne andere antwort",
      "was_willst_du": "alles",
      "mehr_zur_auswahl": ["einiges", "vieles und", "g\u00e4r nix"]
  
  }, {
      "meine_frage": "tom &amp; jerry",
      "ne_andere_frage": "mickey maus",
      "was_willst_du": "oder",
      "mehr_zur_auswahl": ["manches", "einiges", "vieles und", "g\u00e4r nix"]
  
  }, {
      "meine_frage": "dick und doof",
      "ne_andere_frage": "minnie muas",
      "was_willst_du": "nichts",
      "mehr_zur_auswahl": ["g\u00e4r nix"]
  
  }]
  </code></pre>
  
  <p>result should look like:</p>
  
  <pre><code>[{
      "meine_frage": ["hier kommt die antwort", "tom &amp; jerry", "dick und doof"],
      "ne_andere_frage": ["ne andere antwort", "mickey maus", "minnie muas"],
      "was_willst_du": ["alles", "oder"],
      "mehr_zur_auswahl": ["einiges", "vieles und", "g\u00e4r nix", "manches", "einiges", "vieles und", "g\u00e4r nix"]
  }]
  </code></pre>
  
  <p>some values are already arrays whereas others not, the keys are genterated dynamically so assume the the key name is unkown</p>
  
  <p>i tried iterating over the key/values with $.each and for loops but without success, also searched the web but couldnt find similar,
  appreciate any help</p>