I’ve never used a JSONItem before but am trying to parse the following JSON string:
{“shapePoints”:[39.740112,-104.984856,39.799438,-105.72361,39.6403,-106.373596],“elevationProfile”:[{“distance”:0,“height”:1616},{“distance”:63.55,“height”:3911},{“distance”:121.96,“height”:2501}],“info”:{“copyright”:{“text”:“© 2013 MapQuest, Inc.”,“imageUrl”:“http://api.mqcdn.com/res/mqlogo.gif",“imageAltText”:"© 2013 MapQuest, Inc.”},“statuscode”:0,“messages”:[]}}
Following the example in the manual, I can extra the “elevationProfile” JSONItem from this string but when I try to extract the distance height pairs I keep getting a JSONItem is an array exception. I gather this is because of the multiple pairs within the square brackets. Any suggestions for how to extract the distances and heights and read them into two arrays, dist and elevation which are dimensioned as doubles?
Thanks