Hacker News new | ask | show | jobs
by pseudo_meta 661 days ago
With the syntax being a selling point, I think having a comparison between jq, yq, and dasel would be really useful. Luke a few examples how to accomplish X in each one of them, so we can judge for ourselves which syntax is preferable.
1 comments

Comparison of last example from https://axel.leroy.sh/quick-refs#dasel

desel: .data.all().filterOr(moreThan(.quantity,3),equal(.quantity,3)).mapOf(key,key,quantity,quantity)

yq: .data[] | select(.quantity >= 3) | {"key": .key, "quantity": .quantity}

jq: .data[] | select(.quantity >= 3) | {key, quantity}