how to count length of the JSON array element
<p>I'm trying to count the length of the JSON array element. I know to count the length of array using <code>json.array.length</code>. That is need to find that how many items in every index.</p>

<p>If my array is:</p>

<pre><code>  {"shareInfo":[{"id":"1","a":"sss","b":"sss","question":"whi?"},
  {"id":"2","a":"sss","b":"sss","question":"whi?"},
  {"id":"3","a":"sss","b":"sss","question":"whi?"},
  {"id":"4","a":"sss","b":"sss","question":"whi?"}]}
</code></pre>

<p>Then I need to find the length of <code>{"id":"1","a":"sss","b":"sss","question":"whi?"}</code>. In this there have four items. I tried this with <code>data.shareInfo[i].length</code>. But it produces error.</p>

<p>Please anyone tell me how to find the length.... Thanks....</p>
