08-19-2021 08:47 PM
In the router i am trying to route data based on below criteria
if any of the value in statusC.contains("T’) route to view1
if any of the value in !statusC.contains("T’). (does not contains) route to view2
How can i best achieve from below data
[
{
"group" : [
{
"statusC":"T"
},
{
"statusC":"T"
}
]
},
{
"group" : [
{
"statusC":"A"
},
{
"statusC":"A"
}
]
},
{
"group" : [
{
"statusC":"T"
},
{
"statusC":"A"
}
]
},
{
"group" : [
{
"statusC":"A"
},
{
"statusC":"T"
}
]
}
]
Solved! Go to Solution.
08-23-2021 02:12 PM
08-19-2021 10:18 PM
@npise use the expression - jsonPath($, “$group[?(@.statusC == ‘T’)]”).length > 0 : route to view1 else view2
08-19-2021 10:26 PM
Thanks for the response
I am using a router snap and i dont think i can use conditional.
08-19-2021 10:27 PM
@npise any expression enable snap you can use it.
08-23-2021 02:12 PM