Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# json get value by key

string jsonData = @"{
'FirstName':'Pietie',
'LastName':'Massimo'
}";

var details = JObject.Parse(jsonData);
var firstName = details["FirstName"]

or 

dynamic details = JObject.Parse(jsonData);
var firstName = details.FirstName;
 
PREVIOUS NEXT
Tagged: #json #key
ADD COMMENT
Topic
Name
4+1 =