I'm trying to get JSON content with Newtonsoft.Json. To read one variable i have that method and It's working fine:
dynamic data = JObject.Parse(json);
return data.FirstName;
The problem begins if I want to read variable which is in array ex:
{"family": [{"fatherFirstName": "John", "motherFirstName": "July"}, {"fatherFirstName": "Jack", "motherFirstName": "Monika"]}
And for example I only want to get every father's first name. Anybody know how can I do this?
Edit1: Ok I fixed the convert from JArray to string but now there is problem that It reads family variable properly but If I want to get exact variable from Array it says that variable like this doesn't exist.