Another question is it possible to check for the e...
# help
c
Another question is it possible to check for the existance of a partial object in an array of object. let say we have
[{companyId: "company1"}, {companyId: "company2"}]
and I want to do something like
{companyId: request.principal.attr.companyId} in request.resource.attr.companies
a
Yep, you could use
exists
for this, something like
Copy code
request.resource.attr.companies.exists(c, c.companyId == request.principal.attr.companyId)
c
Cool thankyou!