1> Add this namspace.
using Newtonsoft.Json.Linq;
2> use this source code.
JObject joResponse = JObject.Parse(response);
JObject ojObject = (JObject)joResponse["response"];
JArray array= (JArray)ojObject ["chats"];
int id = Convert.ToInt32(array[0].toString());
Related Contents:
- How can I parse JSON with C#?
- Parse JSON in C#
- JavaScriptSerializer.Deserialize – how to change field names
- Read and parse a Json File in C#
- Parsing JSON Object with variable properties into strongly typed object
- RestSharp JSON Parameter Posting
- Convert JSON String to JSON Object c#
- Incremental JSON Parsing in C#
- Make ASP.NET WCF convert dictionary to JSON, omitting “Key” & “Value” tags
- Strings sent through Web API’s gets wrapped in quotes
- JSON.NET Error Self referencing loop detected for type
- How do I make calls to a REST API using C#?
- How to deserialize an array of values with a fixed schema to a strongly typed data class?
- Easiest way to parse JSON response
- How to let an ASMX file output JSON
- How do I convert a dictionary to a JSON String in C#?
- How to ignore JsonProperty(PropertyName = “someName”) when serializing json?
- Easiest way to create a cascade dropdown in ASP.NET MVC 3 with C#
- Decompressing GZip Stream from HTTPClient Response
- Json Convert empty string instead of null
- ServiceStack REST API and CORS
- Why can’t DateTime.Parse parse UTC date
- Read fixed width record from text file
- JSON library for C# [closed]
- Posting JSON Data to ASP.NET MVC
- How do I convert an ISO8601 TimeSpan to a C# TimeSpan?
- How can I return a custom HTTP status code from a WCF REST method?
- How do I format a DateTime in a different format?
- How to get a JSON string from URL?
- How to deserialize a JSON array into an object using Json.Net?
- Remove file extension from a file name string
- How to not serialize the __type property on JSON objects
- Why does TimeSpan.ParseExact not work
- What is the C# equivalent of NaN or IsNumeric?
- Cannot deserialize the current JSON array (e.g. [1,2,3]) into type
- caliburn.micro serialization issue when implementing PropertyChangedBase
- Parsing a JSON array using Json.Net
- Send JSON via POST in C# and Receive the JSON returned?
- How to convert Json array to list of objects in c#
- Serializing an interface/abstract object using NewtonSoft.JSON
- Json.NET JSONPath query not returning expected results
- Parse a string containing date and time in a custom format
- How to convert XML to JSON using C#/LINQ?
- Httplistener and file upload
- c# convert string expression to a boolean expression [closed]
- Accessing properties with a dot in their name
- How to convert code from C# to PHP [closed]
- Repeated serialization and deserialization creates duplicate items
- Get value from JSON with JSON.NET
- Is C#’s lambda expression grammar LALR(1)?