title: javascript - extract array from json object
body: <p>Let say We have the following json object:</p>
  
  <pre><code>[{"a1" : "a1Val", "a2" : "a2Val", "a3" : "a3Val"}, 
   {"b1" : "b1Val", "b2" : "b2Val", "b3" : "b3Val"},
  
   ....
  
   {"z1" : "z1Val", "z2" : "z2Val", "z3" : "z3Val"}]
  </code></pre>
  
  <p>How can we retrieve from this object array of only X2 key value pairs.</p>
  
  <p>meaning, the following result:</p>
  
  <pre><code> [ {"a2" : "a2Val"}, {"b2" : "b2Val"}, ... ,{ "z2" : "z2Val"}] 
  </code></pre>
  
  <p>within the best performance.</p>
  
  <p>The key does not have to contains number.</p>
  
  <p>What I need here is a function that will recieve parameter - i
  and return an array of all the i-th objects in the original json object</p>
  
  <p>So for example if we look at the above json object
  and we invoke the method we 2 the method will return</p>
  
  <pre><code> [ {"a2" : "a2Val"}, {"b2" : "b2Val"}, ... ,{ "z2" : "z2Val"}] 
  </code></pre>
  
  <p>Hope it's clear enough.</p>