You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
however if I hardcode the filter value like "Address": "#valueof($.Address[?(@.name== 'Jim')])" then its working. but in my case I need pass the name under loop. any idea ?.
The text was updated successfully, but these errors were encountered:
Functions are identified by # at the start of the string/parameter, in this case the # appears somewhere in the middle of the parameter so it won't assume it's a function.
What needs to be done in these cases is to use concat/xconcat function to construct the jsonPath string, since each parameter is checked for function:
Hi,
I am trying to filter the array using jsonpath with #currentvalueatpath as below but not working..
Source Data : {$.Address[?(@.name== '#currentvalueatpath($ .name)')])"
"PhoneTypeToSearch": "iPhone",
"Address": [
{
"City": "NewYork",
"name": "Jim"
},
{
"City": "NewYork",
"name": "John"
}
],
"people": [
{
"name": "Jim",
"phoneNumbers": [
{
"type": "iPhone",
"number": "0123-4567-8888",
"countryPrefix": "34"
},
{
"type": "work",
"number": "012567-8910"
}
]
},
{
"name": "John",
"phoneNumbers": [
{
"type": "iPhone",
"number": "0123-4562347-8888",
"countryPrefix": "43"
},
{
"type": "home",
"number": "0134523-4567-8910"
}
]
},
{
"name": "John"
}
]
}
Transformer -
{
"Persons": {
"#loop($.people)": {
"Address": "#valueof(
}
}
}
however if I hardcode the filter value like "Address": "#valueof($.Address[?(@.name== 'Jim')])" then its working. but in my case I need pass the name under loop. any idea ?.
The text was updated successfully, but these errors were encountered: