

Show HN: A cli JSON processor powered by Node.js - flerro
http://www.rolandfg.net/2014/07/29/json-commandline-processor/

======
brianparks
From your page: "I tried jq, which seems very good. However I was not quite
able to grasp its syntax, so I gave up searching and I created my own."

I use jq on an almost daily basis, so I can sympathize with your plight. jq's
syntax is documented quite well (if rather succinctly), but one non-intuitive
thing is that it is possible to end up with non-JSON output if you use jq's
array ([]) operator rather than the map() filter. However, I still prefer its
syntax as one pipeline similar to UNIX one-liners rather than several command-
line args, probably purely out of similarity to how I think about the data. I
think about its transformations, rather than as independent selection and
projection steps. This may be personal preference, but I'm curious as to your
thoughts on syntactical choices.

------
zimpenfish
Your first transform example (name, dob) seems to have the wrong output
underneath.

Might also be useful to have a "Why you should use this instead of jq,
json(1), etc."

~~~
flerro
I fixed the example, thanks.

Using jop in place of jq I think is only a matter of personal taste, so
something like "use this instead of that" may sound a little biased ;)

