How do I check if a Party is in an array of Partys?
- frankOP
I’m trying to write a template that
ensurethat a particular party is in a list of Parties. How do I go about checking this? Do I need to convert the Party to a singleton before checkingisInfixOf?
isInfixOf - stefanobaghino-da
I believe you can use
elem, which you can find documented here. - stefanobaghino-da 1
If you need to find other functions, I can wholeheartedly recommend using the search function in the documentation. If you look for a Daml type, you will be returned with relevant results. In this case, I looked for
[a] -> a -> Boolas I was looking for a function that, given a list ofaand a specificacould return me a boolean indicating whether the element is in the list or not.