Your other option if you really need to pull that array of ID’s is to use the currently loggeg in member id and check if that ID exists in your returned array.
If yes, send the logged in member id
If no, do nothing
You can you this by using array includes…something like this
arrayOfIds.includes(loggedInMemberId);