title: Javascript get value from an object inside an array
body: <p>I have an object with key value pairs inside an array:</p>
  
  <pre><code>var data = [
    {
    "errorCode":100,
    "message":{},
    "name":"InternetGatewayDevice.LANDevice.1.Hosts.HostNumberOfEntries",
    "value":"2"
    }
  ];
  </code></pre>
  
  <p>I want to get the value of "value" key in the object. ie, the output should be "2".</p>
  
  <p>I tried this:</p>
  
  <pre><code>console.log(data[value]);
  console.log(data.value);
  </code></pre>
  
  <p>Both logging "undefined". I saw similar questions in SO itself. But, I couldn't figure out a solution for my problem.</p>