I have this JSON data and I need to get some specific values in C#.
{
"info": {
"statuscode": 0,
"copyright": {
"text": "© 2017 MapQuest, Inc.",
"imageUrl": "http://api.mqcdn.com/res/mqlogo.gif",
"imageAltText": "© 2017 MapQuest, Inc."
},
"messages": []
},
"options": {
"maxResults": -1,
"thumbMaps": true,
"ignoreLatLngInput": false
},
"results": [
{
"providedLocation": {
"location": "mannheim, heppenheimer str"
},
"locations": [
{
"street": "Heppenheimer Straße",
"adminArea6": "",
"adminArea6Type": "Neighborhood",
"adminArea5": "Mannheim",
"adminArea5Type": "City",
"adminArea4": "",
"adminArea4Type": "County",
"adminArea3": "Baden-Württemberg",
"adminArea3Type": "State",
"adminArea1": "DE",
"adminArea1Type": "Country",
"postalCode": "68309",
"geocodeQualityCode": "B3CAA",
"geocodeQuality": "STREET",
"dragPoint": false,
"sideOfStreet": "N",
"linkId": "u0y19uvgm4pf",
"unknownInput": "",
"type": "s",
"latLng": {
"lat": 49.509084,
"lng": 8.522526
},
},
{
"street": "Heppenheimer Straße",
"adminArea6": "",
"adminArea6Type": "Neighborhood",
"adminArea5": "Mannheim",
"adminArea5Type": "City",
"adminArea4": "",
"adminArea4Type": "County",
"adminArea3": "Baden-Württemberg",
"adminArea3Type": "State",
"adminArea1": "DE",
"adminArea1Type": "Country",
"postalCode": "68309",
"geocodeQualityCode": "B3CAA",
"geocodeQuality": "STREET",
"dragPoint": false,
"sideOfStreet": "N",
"linkId": "u0y19uees7fb",
"unknownInput": "",
"type": "s",
"latLng": {
"lat": 49.507762,
"lng": 8.519397
},
},
{
"street": "Heppenheimer Straße",
"adminArea6": "",
"adminArea6Type": "Neighborhood",
"adminArea5": "Mannheim",
"adminArea5Type": "City",
"adminArea4": "",
"adminArea4Type": "County",
"adminArea3": "Baden-Württemberg",
"adminArea3Type": "State",
"adminArea1": "DE",
"adminArea1Type": "Country",
"postalCode": "68309",
"geocodeQualityCode": "B3CAA",
"geocodeQuality": "STREET",
"dragPoint": false,
"sideOfStreet": "N",
"linkId": "u0y1dj0msj0y",
"unknownInput": "",
"type": "s",
"latLng": {
"lat": 49.51086,
"lng": 8.525907
},
}
]
}
]
}
I already use JSON.NET and know I have to deserialize it first. But I dont know how to get the "lat" and "lng" values. Im my case I would have to get all 3 of those and compare them.