Hi,
Regardless of where the object came from (having evaluated it from a
JSON string or something else), that's what for..in is for:
var name, obj = {'a': 1, 'b': 2}.evalJSON();
for (name in obj) {
alert(name + = + obj[name]);
}
...alerts a=1 then b=2. The order is not
Sent: Monday, August 10, 2009 3:37 PM
Subject: [Proto-Scripty] Re: Getting keys from a JSON object returned from
transport.responseText.evalJSON(); or for that matter any JSON object
Hi,
Regardless of where the object came from (having evaluated it from a
JSON string or something else), that's
://www.thevacancymarket.com
- Original Message -
From: T.J. Crowder t...@crowdersoftware.com
To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, August 10, 2009 3:37 PM
Subject: [Proto-Scripty] Re: Getting keys from a JSON object returned from
I do know about the
for(var key in jsonObj)
{
jsonObj[key];
}
On Mon, Aug 10, 2009 at 9:54 AM, krishna81m krishna...@gmail.com wrote:
I tried to google and search prototype API for a method that will give
me just the keys in a JSON object.
Is there none in Prototype and no way to know
Subject: [Proto-Scripty] Re: Getting keys from a JSON object returned from
transport.responseText.evalJSON(); or for that matter any JSON object
I do know about the
for(var key in jsonObj)
{
jsonObj[key];
}
On Mon, Aug 10, 2009 at 9:54 AM, krishna81m krishna...@gmail.com wrote
- Original Message -
From: ra kr
To: Prototype script.aculo.us
Sent: Monday, August 10, 2009 5:01 PM
Subject: [Proto-Scripty] Re: Getting keys from a JSON object returned from
transport.responseText.evalJSON(); or for that matter any JSON object
I do know about
What about simply: Object.keys(myObj)?
http://prototypejs.org/api/object/keys
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype script.aculo.us group.
To post to this group, send email to
Yep, that's exactly what I found after even more googling!!
On Aug 10, 12:55 pm, Tobie Langel tobie.lan...@gmail.com wrote:
What about simply: Object.keys(myObj)?
http://prototypejs.org/api/object/keys
--~--~-~--~~~---~--~~
You received this message because you