0

I have a string that looks like:

jQuery18309175745982483048_8380382834({"d":{"__type":"locatorservice.DataTemplate.LocatorResults","ResultData":[{"Address1":"Main Street 1","Address2":"","City":"New York","State":"SN","Zip":"04832","Country":"GER","Latitude":50.29482,"Longitude":12.3242,"StoreId":"32425"},{"Address1":"Main Street 3","Address2":"","City":"New York","State":"SN","Zip":"03242","Country":"GER","Latitude":54.29482,"Longitude":17.3242,"StoreId":"33434"}

And now I only want in a foreach loop the Latitude, the Longitude and the Address and the City of both. But how can I parse that string?

1 Answers1

0
  1. Convert it to Json
  2. Use http://json2csharp.com/ to obtain the class in which you will put the result of parsing
  3. RootElement Result = JsonConvert.DeserializeObject<RootElement>(JsonString);

Don't forget using Newtonsoft.Json;

Fedor
  • 1,548
  • 3
  • 28
  • 38
AnotherGeek
  • 874
  • 1
  • 6
  • 24