Created
September 20, 2023 12:52
-
-
Save anderseknert/122793cd9beab1e633fc62ec73c98fcf to your computer and use it in GitHub Desktop.
object.get
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allow if { | |
# return input.user.name, or "anyomous" if the lookup fails | |
user := object.get(input, ["user", "name"], "anonymous") | |
user != "anonymous" | |
# ... more conditions | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment