在Apache免费标记中搜索列表中的值

问题描述 投票:0回答:1

我有一个称为listorgList,其中存在大约10个值。我有用户提供的输入。我必须搜索列表中是否存在input

有人可以建议我在apache free marker中如何做到这一点。如果不使用循环会更好。因为我必须使用oracle digital assistant中的代码。

chatbot freemarker mcs
1个回答
0
投票

您可以使用表达式orgList?seq_contains(input)执行此操作,该表达式返回一个布尔值。因此例如可以像<#if orgList?seq_contains(input)>...</#if>一样使用。

© www.soinside.com 2019 - 2024. All rights reserved.