Need Help to compare Attributes #619
Closed
naveenkulkarni029
started this conversation in
Community
Replies: 1 comment 2 replies
-
Hey, perhaps something like this: https://play.openpolicyagent.org/p/4rNangR9tf
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello OPA World, I need Help in comparing attibutes between two objects. Below is my
JSON Data
{ "output_groups": { "country_IN": true, "acc_group_wl": true, "organisationVerification": 1 }, "output_role_bindings_groups": "cm-users", "role": "CustomerManagement_ViewCustomers", "subject_attributes": { "country": "IN", "country_IN": true, "acc_group_wl": true, "email": "[email protected]", "id": "145852", "organisationVerification": 1 } }
I want to compare if all the attributes of the
output_groups
object are a part of thesubject_attributes
.I tried with the
every
andsome
and then useglobmatch
[https://docs.styra.com/opa/rego-by-example/builtins/regex/globs_match](Link for the example) which did not match my requirement.Reaching out to the community after multiple failed attempts.
Happy to hear back from you.
Thanks,
Naveen Kulkarni
Beta Was this translation helpful? Give feedback.
All reactions