tidwall / jj

JSON Stream Editor (command line utility)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting values in JSON lines

f3rn4nd0-c354r opened this issue · comments

Hello!

I find this API more readable than jq. However, I'm not sure how to perform some actions:

JSON lines example:

{"name": "Gilbert", "age": 61}
{"name": "Alexa", "age": 34}
{"name": "May", "age": 57}

How would I update all names to "Peter"?
How would I update "name" key to "firstname"?

Thanks!

(I tried jj -v Peter '..#.name')

I think this is not supported - jj seems to not support ndjson at all sadly. I agree that the syntax is more readable than jq, but also far more limited.