You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by djthornton1212 June 14, 2024
I've tried different syntax to splat an env() and feel like I'm missing something.
Examples:
Not working
list='["item1", "item2", "item3"]' yq --null-input 'env(list)[]'# returns Error: bad expression, please check expression syntax
list='["item1", "item2", "item3"]' yq --null-input '[env(list)][]'# nests the array in an array then splats the second level, returning me to where I began
Discussed in #2069
Originally posted by djthornton1212 June 14, 2024
I've tried different syntax to splat an env() and feel like I'm missing something.
Examples:
Not working
Working:
edit:
I've also found that using the
as
operator allows for correct splatting... is that the word...I guess I'm trying to understand if the
working
examples are the correct way or is there's another method I should be using.Thanks,
The text was updated successfully, but these errors were encountered: