![](https://programming.dev/pictrs/image/a1da9011-b17f-4199-8dd5-46b9615e43fd.png)
![](https://programming.dev/pictrs/image/8140dda6-9512-4297-ac17-d303638c90a6.png)
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).
While yes, the way I had it structured looked like a CSV if you squinted a little, I do fully agree AWK can’t be used for just any old JSON.
jq
is dope, but that language still feels pretty confusing IMO.