[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread T.J. Crowder
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

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread Alex McAuley
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

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread Matt Foster
://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

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread ra kr
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

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread Alex McAuley
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

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread krishna
  - 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

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread Tobie Langel
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

[Proto-Scripty] Re: Getting keys from a JSON object returned from transport.responseText.evalJSON(); or for that matter any JSON object

2009-08-10 Thread krishna
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