โ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