Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
//Json Get Field from Array
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 //Json Get Field from Array using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using Newtonsoft.Json.Linq; namespace Rextester { public class Program { public static void Main(string[] args) { JArray obj = JArray.Parse(@" [{ 'Mouse': 'HPQ', 'VideoCard' : 'NVidia' },{ 'Mouse': 'maou2', 'VideoCard' : 'NVidia2' }] "); Console.WriteLine(obj); JToken token = obj.SelectToken("[1].Mouse"); if(token == null) return; Console.WriteLine(token); } } }
run
|
edit
|
history
|
help
0
extension methods
01-SI
sdfrgyhjuiku7y6t5rf
pared 1
Watch Jurassic World Dominion Online Free
asxsdf
Task 1_4
Prsonal informashin
asdasd
world