Join Slack
Communities
Powered by
how can i get only indore employee data using cerb...
# community
b
Balwan singh
09/15/2023, 9:42 AM
how can i get only indore employee data using cerbos "employee": [ { "id": "1", "firstName": "Tom", "lastName": "Cruise", "city": "indore" }, { "id": "2", "firstName": "Maria", "lastName": "Sharapova", "city":"indore" }, { "id": "3", "firstName": "James", "lastName": "Bond", "city":"ujjain" } ]
c
Charith (Cerbos)
09/18/2023, 7:41 AM
I assume this is an attribute of the resource. You could write an expression like
R.attr.employee.filter(e, e.city == "indore")
.
https://docs.cerbos.dev/cerbos/latest/policies/conditions#_lists_and_maps
Open in Slack
Previous
Next