If condition in rythmengine for complex object

2 views
Skip to first unread message

Rohit Gupta

unread,
Aug 20, 2021, 7:48:03 AM8/20/21
to rythmengine
Hi Team,

I need help in writing if condition check in rythmengine.  

Below is the json structure and I want to check if routing status is equivalent to some string. but I am not able to do it. Below is the code. Any help is appreciated.

"routing" : [
{
"date" : "2020-10-22 18:30:00",
"user" : "Winston Wang",
"status" : "Requested information",
"comments" : "Some of the expenses are missing",
"type" : "Approval",
"pending" : true
}, .... ] 
}

@for(route:routing){
@if (@route.status@.equals("Requested information")) {
<div id="comments" class="item" style="background-color: F5F4F2; padding: 10px; border-radius: 8px;">
<div id="commentor" style="font-size: 14px; font-weight: 800;">@route.user@ comment</div>
<div id="feedback-text" style="font-size: 12px; margin-top: 10px;">@route.comments@</div>
</div>
}
}

Regards,
Rohit


Reply all
Reply to author
Forward
0 new messages