Nested response #156
Answered
by
anderseknert
kotyara85
asked this question in
OPA and Rego
-
Hello everyone,
As you can see some objects are owned by others
Getting just the root objects is not a problem with this func
Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
anderseknert
Mar 25, 2022
Replies: 1 comment 1 reply
-
Hi Konstantin! Sure, something like this, maybe? package play
import future.keywords
modules[obj] {
some obj in data.objects
glob.match(input.type, [":"], obj.urn)
}
transform[mod.urn] = obj {
some mod in modules
obj := {
"urn": mod.urn,
"objects": {k: v | v := data.objects[k]; v.parent == mod.urn}
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kotyara85
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Konstantin! Sure, something like this, maybe?