It might be too easy but I just cannot find a solution to this. How can I directly parse the string
array
out of the JSON
object?
For example,
json = {"names":["John", "Alex", "David"]}
I cannot do json.getJSONArray("names")
since it doesn't return a string
array
.
Try this buddy, you will get the result in an array of strings.
You can try this my friend
Try this function
You can get the data as a json array and the loop through it to create a list