npise
4 years agoNew Contributor II
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"
}
]
}
]