Skip to content

Nested response #156

Mar 25, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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}
    }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kotyara85
Comment options

Answer selected by kotyara85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants