I don’t get why this is so stupidly difficult, so please help me.
I have JSON data I need to parse in UnityScript. In PHP or jQuery, this would be a 3-line problem:
$data = json_decode($json);
foreach ($data->features as $feature) {
echo $feature->properties->name."\n";
}
given my data structure like this, how the f*** do I do the equivalent in Unity ???
{"type":"FeatureCollection","features":[
{"type":"Feature","properties":{"id":122567,"name":"Wexford","population":185},"geometry":{"type":"Point","coordinates":[80776.1,68776.1]}},
{"type":"Feature","properties":{"id":121119,"name":"Mothotorn","population":631},"geometry":{"type":"Point","coordinates":[28776.1,12776.1]}},
{"type":"Feature","properties":{"id":121091,"name":"Rensho","population":346},"geometry":{"type":"Point","coordinates":[27445.3,59445.3]}},
{"type":"Feature","properties":{"id":121121,"name":"Thyberla","population":187},"geometry":{"type":"Point","coordinates":[28776.1,36776.1]}},
{"type":"Feature","properties":{"id":121102,"name":"Coplucir","population":337},"geometry":{"type":"Point","coordinates":[28045.3,36045.3]}},
{"type":"Feature","properties":{"id":121737,"name":"Thusojex","population":236},"geometry":{"type":"Point","coordinates":[50976.1,26976.1]}},
{"type":"Feature","properties":{"id":121164,"name":"Werolar","population":163},"geometry":{"type":"Point","coordinates":[30178.6,66178.6]}}
]}