Searching value in a list in Apache free marker

折月煮酒 提交于 2020-05-28 11:40:09

问题


I have a list known as orgList in which there are around 10 values present. i have input given by user. i have to search whether that input is present in the list or not.

Can anybody suggest me how can i do that in apache free marker. better if without using loop. because I have to use code in oracle digital assistant.


回答1:


You can do that with the expression orgList?seq_contains(input), which returns a boolean. So for example it can be used like <#if orgList?seq_contains(input)>...</#if>.



来源:https://stackoverflow.com/questions/61830354/searching-value-in-a-list-in-apache-free-marker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!