Nearest-neighbor with an array of JSON coordinates


Anyone know a good way to implement this? On app launch, the app gets and stores a device’s coordinates - now I just need it to determine the closest coordinate using data from a JSON file.


Step 1 is to paste all relevant code.

This looks suspiciously like a homework problem … but let’s start with the code and go from there…