4 ms·
How would you do a `data.keys.sort` with jq? Here I don't have to learn a new programming language or hack around with UNIX pipes ;)
by dorianm 10y ago
How would you do a `data.keys.sort` with jq? Here I don't have to learn a new programming language or hack around with UNIX pipes ;)
- lumpypua 10y ago`keys|sort` in jq.
- dorianm 10y agoNice! Thanks
- hyperpallium 10y agojq has sort and sort_by(exp). Its | is a jq operator, not a unix pipe. It's true it's a new lang, and although simple, I often have to look things up. It might be nice to have a jq REPL, so needn't quote, and easier to keep state around.
- voltagex_ 10y agoI find jq syntax tricky, and it's difficult to work out what I need to get to specific elements. I guess I'm more used to things like XPath. Seconding the request for a REPL