yq/pkg/yqlib/doc/operators/headers/eval.md

8 lines
349 B
Markdown
Raw Normal View History

2022-02-01 03:47:51 +00:00
# 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, be it a path `.a.b.c | select(. == "cat")`, or an update `.a.b.c = "gogo"`.
2022-02-01 03:47:51 +00:00
Tip: This can be a useful way to parameterise complex scripts.