[Json-rpc-java] Need your help.
Eric Pascarello
alienfrog at gmail.com
Wed Aug 6 22:17:50 SGT 2008
You just reference the array the same way with the dot and bracket notation.
var myArray =
jsonObject.list["gov.fcc.webforms.ccms.admin2000.beans.ComplaintDO"];
You can get the length
var lth = myArray.length;
And you can loop through and access the properties in the objects
for(var i=0;i<lth;i++){
alert(myArray[i].first__name);
}
Regards,
Eric Pascarello
On Wed, Aug 6, 2008 at 8:54 AM, sharath karnati <karnatis at yahoo.com> wrote:
> Thanks Eric.
>
> If I have following string in req.responseText
>
>
> {"list":{"gov.fcc.webforms.ccms.admin2000.beans.ComplaintDO":[{"first__name":"Dmitry","s
> elected":"false"},{"first__name":"Robert","selected":"true"}]}}
>
> How to find list size and how to iterate list values? How to read
> 'first__name' value from jsonObject?
>
> Thanks,
> Sharath.
>
>
More information about the Json-rpc-java
mailing list