如果在 rythmengine 中检查条件,我需要书面帮助。
下面是json结构
"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
},
.... ]
}
我想检查路由状态是否等同于某个字符串。但我做不到。下面是html模板代码。任何帮助表示赞赏。
@args() {
List routing
}
@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>
}
}