In apigee Edge do we have support for Complex Element JSONPath?

Hi ,

i am using apigee edge public cloud.

Not getting the expected result for the JSONPath

Input:

{ “details”:[ { “name”:“A”, “dept”:“CSE” }, { “name”:“B”, “dept”:“MECH” }, { “name”:“C”, “dept”:“EEE” }] }

Expression:

$.details[?(@.name=‘B’)].dept

Expected Output:

MECH

Actual Output:

Could you please check and let me know why we have this behavior.

It is not clear from your question where and how you use this Jsonpath accessor. Could you elaborate more where you observe this , a snippet of the code will also help.

In Apigee EDGE, that query does not work.

In Apigee X, it works as expected. Apigee Edge is using a very old version of jsonPath, and I don’t believe it supports that predicate syntax.

You could resolve that sort of query with JavaScript, in Apigee EDGE.