Skip to content

How can you express a multi-key object via an object comprehension? #197

Discussion options

You must be logged in to vote

Hi @bleggett! Maybe I'm missing something too :) Is there some reason you need to use object comprehensions at all here?

obj_list := [obj | 
    some attr in attrs
    obj := {
    	"entity_identifier": attr.entity_identifier,
        "entity_attributes": [{
	    "attribute": "https://example.org/attr/OPA/value/AddedByOPA",
            "displayName": "Added By OPA"
        }]
}]

Replies: 1 comment 1 reply

Comment options

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

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