How do I convert an Object Array to a Foundry Object Set in my Function?

217 Views Asked by At

My Function’s input is an Object Array but I want to convert it to an Object Set to have searchAround capability. Is this possible within the Function? Or do I have to change the Function input to take an Object Set

1

There are 1 best solutions below

0
Max Magid On BEST ANSWER

You can create an Object Set within your Function as follows:

Objects.search()
        .myObjectType()
        .filter(x => x.myObjectId.exactMatch(...myObjects.map(y => y.myObjectId))