yq/pkg/yqlib/doc/operators/headers/eval.md
2022-02-01 14:47:51 +11:00

8 lines
343 B
Markdown

# Eval
Use `eval` to dynamically process an expression - for instance from an environment variable.
`eval` takes a single argument, and evaluates that as a `yq` expression. Any valid expression can be used, beit a path `.a.b.c | select(. == "cat")`, or an update `.a.b.c = "gogo"`.
Tip: This can be useful way parameterise complex scripts.