How to use the name of the input in VRL? #11934
-
How can I write and if statement using the name of the input to make a decision? |
Beta Was this translation helpful? Give feedback.
Answered by
StephenWakely
Mar 22, 2022
Replies: 1 comment 4 replies
-
So, supposing you had a field called if .name == "flub" {
# Do the thing when name is flub.
} else {
# Do the thing when name is not flub.
} You can find more details here. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
StephenWakely
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, supposing you had a field called
name
in your input, you could write something like the following:You can find more details here.