aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Is it possible to iterate an JSON map object without keys? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Is it possible to iterate an JSON map object without keys?" Watch "Is it possible to iterate an JSON map object without keys?" New topic
Author

Is it possible to iterate an JSON map object without keys?

Deepakkumar Devarajan
Ranch Hand

Joined: Apr 19, 2011
Posts: 54

hi all,

Is it possible to iterate an JSON map object without keys? I have an Json object like the one below


the keys size, color and material are dynamically generated . How to iterate the map by fetching it's keys dynamically?


Regards,
Deepakkumar Devarajan
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Please use code blocks when you post code.

Also watch out for the trailing comma, IE hates that.

Deepakkumar Devarajan
Ranch Hand

Joined: Apr 19, 2011
Posts: 54

Thanks For helping.... How do I further fetch the values using the keys fetched? I missed to the coding in code tag..

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Deepakkumar Devarajan wrote:How do I further fetch the values using the keys fetched?


Did you run the example I gave you? The answer is there.

Eric

Deepakkumar Devarajan
Ranch Hand

Joined: Apr 19, 2011
Posts: 54

Eric Pascarello wrote:
Deepakkumar Devarajan wrote:How do I further fetch the values using the keys fetched?


Did you run the example I gave you? The answer is there.

Eric



Thanks Eric. I did not notice obj[key]. Thanks a ton for helping... this really helped me. :-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it possible to iterate an JSON map object without keys?