Comma operator order of precedence different to jq #1156
Open
Description
Describe the bug
If you want return more subkeys in expression like .a|,b,.c
, yq return only subvalue for first subkey and others are null.
JQ returns all subvalues correctly.
Version of yq: 4.22.1 (tested on 4.24.2, 4.14.1 and 4.10.0 too)
Operating system: linux (noticed on windows port too)
Installed via: ArchLinux package go-yq
Input Yaml
a:
b: B
c: C
d: D
Command
The command you ran:
yq '.a|.b,.c,.d' input.yaml
Actual behavior
B
null
null
Expected behavior
B
C
D
Additional context
It was originally discovered in XML mode, but it behaves the same in YAML and JSON.