Using SimpleJSON with array
Here is the JSON I am trying to parse. I am able to parse the "Reef name" but "Threat Levels" is an array and my solution below does not work. How do I parse an array with SimpleJSON?
{"Reef name": "Reef near Kauai", "Nearest Country/Territory": "United States", "Longitude": -159.454336950294, "Latitude": 21.8742673333454, "Data Source": "World Resources Institute. Reefs at Risk Revisited. 2011.", "Data Year": 2011, "Threat Levels": [{"overfishing": "High"}]}
JSONNode Result = JSONNode.Parse(request.downloadHandler.text); outputArea.text = request.downloadHandler.text;
JSONNode Reefname = Result[0].Value;
JSONNode Country = Result[1].Value;
JSONArray array = Result[6].AsArray;
outputArea.text = array[0].Value;
Comment
Your answer

Follow this Question
Related Questions
How to save data in Game 0 Answers
Json Utilities returns empty object (javascript) 2 Answers
how do you Deserialize JSON in a list? 0 Answers
Problem with unitywebservice and json. Status Code: 400 1 Answer
How to read array json file? 0 Answers