Sunday, 15 June 2014

c# - Is there a way to remove nodes from JSON.NET JObject of a certain type? -



c# - Is there a way to remove nodes from JSON.NET JObject of a certain type? -

i've got json object that's returned api , of nodes arrays. there way me pull out of object based on "type" ?

for example:

{ "result" : { "field1": "value1", "field2" : [ "val2", "val3" ], "field3" : "val4", "field4" : "val5" } }

i'd able remove "field2" because it's array.

i'm not sure how iterate through object in way give me type of object.

i'm using c# , json.net 6.0.5

thanks!

after parse info this:

jsonobject.property("field2").remove();

c# json json.net

No comments:

Post a Comment