Back to Opa

Rego Keyword Examples: some

docs/docs/policy-reference/keywords/some.md

1.16.1461 B
Original Source

The some keyword is used to define a local variable for use later in a rule. The keyword can also used in conjunction with the in keyword to enumerate a series of items in a list or key value pairs in an object.

Examples

<PlaygroundExample dir={require.context('./_examples/some/some-in')} />

<PlaygroundExample dir={require.context('./_examples/some/some-in-object')} />

<PlaygroundExample dir={require.context('./_examples/some/some-iteration')} />