You can try using linq:
JArray jsonarray = JArray.Parse("[{'Id':3, 'Name': 'Product3'}, {'Id':1, 'Name': 'Product1'}, {'Id':2, 'Name': 'Product2'}]");
var name = jsonarray
.FirstOrDefault(x => x.Value<int>("Id") == 1)
.Value<string>("Name");
Please note that you must perform a null check because it FirstOrDefaultcan return null if the element with the property is Id == 1not found.
source
share