manohar
4 years agoContributor
Checking for Exist in Router
Hi there, I have this pipeline, that I am using to check for a path in Router snap and for somereason, cant make it work.
any pointer on what I am missing?
Basically I am looking for “E1EDPT2” in the json in my router, and I am using'E1EDPT2' in $
in my router. and it just ignores it says its missing.
[
{
"IDOC": {
"E1EDP01": [
{
"POSEX": "00010",
"E1EDPT1": {
"E1EDPT2": {
"TDLINE": "Line 10 First test"
}
}
},
{
"POSEX": "00020",
"E1EDPT1": {
"E1EDPT2": [
{
"TDLINE": "This is the second array text being sent."
},
{
"TDLINE": "This is the second line of second array text being sent"
}
]
}
}
]
}
}
][pipeline_2021_08_11 (2).slp|attachment](upload://oZ5dwsBjVnpLIMhkvhbreCtxi8k.slp) (6.9 KB)
Any help is greatly appreciated.
thanks
Manoharpipeline_2021_08_11 (2).slp (6.9 KB)
Yes, I presume so.
So you might change #3 to
jsonPath($,"$.IDOC.E1EDP01[?(@.hasPath('E1EDPT1') && @.E1EDPT1.hasPath('E1EDPT2'))]").length > 0