How can can check the key in object?

This is my JsonObject:
This image shows a JSON structure for parts, which includes general information, supplier data, and part data sections with various properties like supplier UUID, status, stock, price, part numbers, product SKU, and product title. (Captioned by AI)

To check if the JsonObject contains key parts I can use this in If activity:

JsonObject.ContainsKey(“parts”)

But how can I check if JsonObject contains key supplierData of key stock.

This expression don’t work:
JsonObject.ContainsKey(“parts”)(“supplierData”) or
JsonObject.ContainsKey(“parts”)(“supplierData”)(“stock”)

I don’t want use For each activity in dit case. Do somebody any idee?

JsonObject("parts").ContainsKey("supplierData")

there are several methods

One of them is a relative JSON Path looking for SuplierData at any level

Assign Activtiy:
hasFound =myJOBject.SelectTokens("..supplierData").Any()

in Addition to above just a few visualizations:
grafik

Also we can adapt e.g. returning the path:
grafik

Greate, thank you very much!

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