I have a JSON file in my project that looks like this:
{"_id":707860,"name":"Hurzuf","country":"UA","coord":{"lon":34.283333,"lat":44.549999}}
{"_id":519188,"name":"Novinki","country":"RU","coord":{"lon":37.666668,"lat":55.683334}}
{"_id":1283378,"name":"Gorkhā","country":"NP","coord":{"lon":84.633331,"lat":28}}
I'm not sure how to loop through each line to put it in an array. How can I do this?
[and], and JSON.parse it. OR fix it so it is valid to start and not have to deal with that.fsif you're using javascript in the browser, you'll have to use some ajax request.