Select
Select is used to filter arrays and maps by a boolean expression.
Related Operators
equals / not equals (
==
,!=
) operators herecomparison (
>=
,<
etc) operators hereboolean operators (
and
,or
,any
etc) here
Select elements from array using wildcard prefix
Given a sample.yml file of:
then
will output
Select elements from array using wildcard suffix
Given a sample.yml file of:
then
will output
Select elements from array using wildcard prefix and suffix
Given a sample.yml file of:
then
will output
Select elements from array with regular expression
See more regular expression examples under the string
operator docs.
Given a sample.yml file of:
then
will output
Select items from a map
Given a sample.yml file of:
then
will output
Use select and with_entries to filter map keys
Given a sample.yml file of:
then
will output
Select multiple items in a map and update
Note the brackets around the entire LHS.
Given a sample.yml file of:
then
will output
Last updated