Hi, Marc! Thanks for quick answer!

This is great for situations where I know exactly what I'm looking field "
status". And if we consider the more general case and determine which
fields have
sent me a server?

---
С уважением,
Jagget

On 25 March 2011 11:34, Marc Puts <[email protected]> wrote:

>
> On 03/25/2011 09:25 AM, Jagget wrote:
> > Hello, Everyone!
> >
> > I receive JSON from server. JSON may be different. For example,
> > "*[{"status":"ok"},{"name":"test"}]*". If I know, what field "status"
> > exist, then I can check it value: *resp[0].status*. But I dont know
> > it, I need determine, what object's name *IS *'status'. Is it
> > possible? How can I do this?
>
> Something like this?
>
> for (var i=0, j=resp.length; i<j; i++) {
>   if ("undefined" !== typeof(resp[i].status)) {
>     var status = resp[i].status;
>     break;
>   }
> }
> alert("The status is: " + status);
>
>
> Marc
>
>
> ------------------------------------------------------------------------------
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to