want to get the value of array key : <p>I have a complicated array and want to find the value of this. but the problem is answer getting like 0,1,2,3,4,5</p>

<p>following is the code to getting the value of state of array</p>

<pre><code>var shardState = Object.keys(mydata.cluster.collections[collectionName].shards[String(shardName)].state);
alert(shardState);
</code></pre>

<p>Following is the array.</p>

<pre><code>{
  "responseHeader":{
    "status":0,
    "QTime":4},
  "cluster":{
    "collections":{
      "college":{
        "pullReplicas":"0",
        "replicationFactor":"1",
        "shards":{"shard1":{
            "range":"80000000-7fffffff",
            "state":"active",
</code></pre>
