Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

c# get value from json object

using System;
using Newtonsoft.Json.Linq;

namespace testClient
{
    class Program
    {
        static void Main()
        {
            var myJsonString = "{report: {Id: "aaakkj98898983"}}";
            var jo = JObject.Parse(myJsonString);
            var id = jo["report"]["Id"].ToString();
            Console.WriteLine(id);
            Console.Read();
        }
    }
}   
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #json #object
ADD COMMENT
Topic
Name
2+2 =