How can I access the value of url in the JSON string below?
JSON
{
"id": "7453",
"picture": {
"data": {
"is_silhouette": false,
"url": "https:\/\/scontent.xx.fbcdn.net\/v\/t1.0-1\/p50x50\/gf6474hfff.jpg?oh=fy&oe=trtr"
}
}
}
Dim o As Newtonsoft.Json.Linq.JObject = Newtonsoft.Json.Linq.JObject.Parse(json)
I can access id like so:
o("id").ToString()
So I would expect the following would work for the url property, but I get an error:
Object reference not set to an instance of an object
o("picture.data.url").ToString()
o("picture")("data")("url")- it wont parse the string obj reference for you. its usually easier to work with when deserializedjsonlint.com