Closed tiawl closed 1 month ago
Hi,
I am using the v4.44.1 version. I picked the blank template because I do not know if I am facing a normal behavior or a bug.
I have the following YAML file:
--- # john.yaml someone: &someone name: John birthday: yesterday list: - <<: *someone list: - <<: *someone ...
What I am trying to achieve is to:
dummy
Here the commandline I use to achieve that:
yq -N 'explode(.) | (.. | key = "dummy") |= .' john.yaml
Here the result I am expecting:
dummy: dummy: John dummy: yesterday dummy: - dummy: John dummy: yesterday dummy: - dummy: John dummy: yesterday
But it is giving me the following output:
dummy: dummy: John dummy: yesterday dummy: - name: John birthday: yesterday list: - dummy: John dummy: yesterday
To get the expected behavior I have to use the following filter to "re-evaluate" the result of explode:
explode
yq -N 'explode(.) | @yaml | @yamld | (.. | key = "dummy") |= .' john.yaml
Am I missing something ? Is this a normal behavior ? Sorry if I am bothering with something really simple. Thank you.
Hi,
I am using the v4.44.1 version. I picked the blank template because I do not know if I am facing a normal behavior or a bug.
I have the following YAML file:
What I am trying to achieve is to:
dummy
.Here the commandline I use to achieve that:
Here the result I am expecting:
But it is giving me the following output:
To get the expected behavior I have to use the following filter to "re-evaluate" the result of
explode
:Am I missing something ? Is this a normal behavior ? Sorry if I am bothering with something really simple. Thank you.