Find json object in json array

I am having a hard time finding an asnwer.

If I have the following json array


And I want to search for product_id 456 and get the entire json object how would I do that? I am trying to avoid a for each.

Find starter help here:
FindObjectInArray.xaml (6.2 KB)
demo1.json (135 Bytes)

JsonArray.Cast(Of JObject).Where(Function (x) x("product_id").toString.Equals("456")).toList
and returning a list of JObjects with the found JObjects

1 Like

That works quite nice thank you! While researching I also found you can do it like this.


You can test the Json path’s with this handy site if whoever finds this need a resource.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.