Forum Discussion

npise's avatar
npise
New Contributor II
4 years ago
Solved

Find a specific word in Json Object

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"
}
 ]
}
]

  • Hi @npise,

    I am sure that @Supratim was referring to output0 and output1 on the router, and not to a conditional operator. Configured router with his expression will do the job :

4 Replies