Is your feature request related to a problem? Please describe
format already supports if (<filters>), but only as a single condition for the whole pipe. This works for simple cases, but it becomes awkward when one field needs different values for different conditions (if else/ switch case).
In such cases, users currently have to duplicate logic across multiple pipes or build less readable workarounds.
Describe the solution you'd like
Add switch/case support to the format pipe for writing different values into a single destination field based on multiple filter conditions.
Proposed syntax:
| format switch (
case (status:200) "OK"
case (status:400) "Error"
default "Other"
) as status_string
The switch block should evaluate cases from top to bottom and write the first matching result into status_string.