I'm a bit lost with this jq
command. I have a json
file like that:
...
{
"class": "classOne",
"title": "title1",
"text": "text1"
},
{
"class": "classTwo",
"title": "title2",
"text": "text2"
},
...
What I'm trying to do is replace values of text
s with another value, depending on the value of title
.
How can I do, and how in general can I replace one value depending on another from the same 'group'? Plus, can I specify 'only first' or 'general' following the way sed
works with '.../g'
?
Edit
I want to be able to work with any depth of my json
, that's why my included code isn't very big. Basically I want to modify a value depending on the value of another key always in the same object.
Tyvm.