title: How can I find second key name in JSON using javascript
body: <p>I have below JSON message </p>
  
  <pre><code>[{"Num": 10, "SubLoc": "Chamr"}, {"Num": 34, "SubLoc": "angala"}, {"Num": 4, "SubLoc": "avano"}]
  </code></pre>
  
  <p>How can I find only the second key value i.e., SubLoc in the above case using javascript or jquery ?
  I dont want to use hardcoded value in the javascript object because key value changes in each message.</p>
  
  <p><strong>EDIT :</strong> 
  Below code can provide us the Key : Value data</p>
  
  <pre><code>jobs = [{"Num": 10, "SubLoc": "Chamr"}, {"Num": 34, "SubLoc": "angala"}, {"Num": 4, "SubLoc": "avano"}]
  
  jobs.forEach(function(job) {
  Object.keys(job).forEach(function(key) {
      alert(key + ':' + job[key]);
  });
  });
  </code></pre>
  
  <p>I just need the data of second Key i.e., "SubLoc" in this case.</p>