Yesterday, when I had a file with a list of JSON objects, and I wanted to move the date field at the end to the beginning, so I used regex find and replace to move it. Something like \{(.*?), ("date": ".*?") in Search, and then {$2, $1 in replace (or something close to it).
Yes, I refactor code and data using regex. I can’t be arsed to learn AWK (even though I should).
Yesterday, when I had a file with a list of JSON objects, and I wanted to move the date field at the end to the beginning, so I used regex find and replace to move it. Something like
\{(.*?), ("date": ".*?")
in Search, and then{$2, $1
in replace (or something close to it).Yes, I refactor code and data using regex. I can’t be arsed to learn AWK (even though I should).
AWK doesn’t work with json IIRC. You have to use jq to deal with json.