I am developing an application which reads the names and the coordinations of shopping malls. Then it compares these to the user's current location, so that the user can see only the nearest shopping malls around him. For that reason I was thinking to get all of the names and locations into 2 arrays and compare them with the user's current location. Then I will prepare them for segue and send them to my TableViewController
where I will display everyone of them in different cell.
I am new to Swift and I will be glad if someone can help me how to do that.
My JSON File is:
{
"People": {
"Person0": {
"A1": "New York",
"B1": "ShoppingMall1",
"C1": "43.0757",
"D1": "23.6172"
},
"Person1": {
"A1": "London",
"B1": "ShoppingMall2",
"C1": "44.0757",
"D1": "24.6172"
},
"Person2": {
"A1": "Paris",
"B1": "ShoppingMall3",
"C1": "45.0757",
"D1": "25.6172"
},
"Person3": {
"A1": "Bern",
"B1": "ShoppingMall4",
"C1": "41.0757",
"D1": "21.6172"
},
"Person4": {
"A1": "Sofia",
"B1": "ShoppingMall5",
"C1": "46.0757",
"D1": "26.6172"
}
}
}