This fails because sometimes .Params.related
is nil
$has_foo := index .Params.related "foo"
Unfortunately this does not seem to work
$has_foo := index (.Params.related | default []) "foo"
Any suggestion without using if
to check first?
This fails because sometimes .Params.related
is nil
$has_foo := index .Params.related "foo"
Unfortunately this does not seem to work
$has_foo := index (.Params.related | default []) "foo"
Any suggestion without using if
to check first?
I think with could work.