有没有办法只在一个jq命令中连接这些js的命令?
jq 'map({a: .children[1].text, f: .children[0].text})' | \
jq 'map(select(.a != null))' | \
jq 'map(select(.f != null))' | \
jq 'map([.a, [.f,(.f | length)]])' | \
jq -c '.[]'非常感谢。
发布于 2017-04-12 10:03:20
jq -c '.[] | {a: .children[1].text, f: .children[0].text} | select(.a != null) | select(.f != null) | [.a, [.f,(.f | length)]]'
https://stackoverflow.com/questions/42717586
复制相似问题