Probably a stupid question. I'm getting a JSONArray in the form of
[{'route':'route1'}, {'route':'route2'}, {'route':'route3'}]
I want to get it into a String array of
["route1", "route2", "route3"]
How?
Probably a stupid question. I'm getting a JSONArray in the form of
I want to get it into a String array of
How? |
|||
closed as unclear what you're asking by Selvin, hichris123, Scott Barta, halfelf, ling.s Feb 12 at 4:35Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question. |
|||
|
The solution that comes to my mind would be to iterate through and just grab the values
|
|||
|
There already was that problem on Stack. Here is the solution. Look here or here. There is what You need. |
|||||||||
|
Try this
|
|||
|
Followed by this TUTORIAL
Or use GSON
|
|||
|
You can try below solutions, Just replace { and } by following code
Or
this will convert to Arraylist and then if you want it to string then convert it to StringArray. for more reference use this link |
|||
|
as straight forward as it can be
|
|||
|
|
|||
|