3 ms·
Jq is really powerful but I think the bit it gets wrong is in array handling and filtering arrays. It is such a common thing that some syntactic sugar would be
by kitd 6y ago
Jq is really powerful but I think the bit it gets wrong is in array handling and filtering arrays. It is such a common thing that some syntactic sugar would be justified, but jq requires you to reach for map() and select() to do even the simplest stuff, and I can never remember if I should filter the `.array` or `.array[]`.
Yq [1] syntax for that is much better, and yq can accept JSON files too.
[1] https://github.com/mikefarah/yq https://github.com/mikefarah/yq
- otabdeveloper4 6y agoYeah, the fact that jq has both 'streams of values' and 'arrays of values', and that the two are somehow completely orthogonal and support different operations is a huge design wart, in my opinion.