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
<title>Hello world</title>
25
C# programming exercise 2
Unsorted array with most occurence
Unexpected result of virtual method
Test
addr.sin_family == AF_UNSPEC
sdfsdfs
Calculadora
Ref