This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes array of values from JSON object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "array of values from JSON object" Watch "array of values from JSON object" New topic
Author

array of values from JSON object

thomas silver
Ranch Hand

Joined: Jun 20, 2003
Posts: 32
I am aware that an array of keys can be obtained as follows:



I was just wondering if there is a way to obtain array of values for a row. TIA.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60806
    
  65

Some context would be nice. What is row for example?

Also, please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.

Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
thomas silver
Ranch Hand

Joined: Jun 20, 2003
Posts: 32
Hi Bear, row is any singular one dimensional extraction from json object. For example (have not been tested),


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60806
    
  65

OK, so what's the question? comedians is already an array.
thomas silver
Ranch Hand

Joined: Jun 20, 2003
Posts: 32
I figured it out. I will post solution later. Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Well your code



gets the names, so you would have to do row[key] to get the values.

Eric
thomas silver
Ranch Hand

Joined: Jun 20, 2003
Posts: 32
Eric, yes that was what I did

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: array of values from JSON object
 
Similar Threads
Room ID in JTable
Read duplicate keys from properties file
Is this an SQL Antipattern?
Help needed on following questions
[Help] Grouping of array elements