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
But the moment I combine them with *, suddenly I get 3 objects. Is that a bug or am I doing something wrong???
Update: it does work if I omit the with_entries expressions. But I can't see why those should effect the outcome of the merge in any way. After all, they are in a different scope of the expression.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
withyq 4.30.1 on Ubuntu 23.10
given this input:
And this yq expression:
otp=26.1 yq -o j '(.otp[env(otp)] | with_entries(.key |= "OTP_" + upcase)) * (.rebar3[.otp[strenv(otp)].rebar3] | with_entries(.key |= "REBAR3_" + upcase))' versions.json
I would expect to get this output:
The problem is, I get this:
Using each of dynamic key lookups by itself works:
But the moment I combine them with
*
, suddenly I get 3 objects. Is that a bug or am I doing something wrong???Update: it does work if I omit the
with_entries
expressions. But I can't see why those should effect the outcome of the merge in any way. After all, they are in a different scope of the expression.Beta Was this translation helpful? Give feedback.
All reactions