Baker1562 Baker1562 - 1 year ago 109
JSON Question

Show/Deserialize JSON in string

I have the next JSON


How can i get only the first object, in this case "Hello"?

Answer Source

Using JSON.NET, for example, you can do this:

var jsonObject = JsonConvert.DeserializeObject<JArray>("[[[\"Hello\",\"Hola\",,,1]],,\"es\"]");
string value = (string)((JValue)jsonObject[0][0][0]).Value;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download