I have a string timestamp key I need to convert to a number because strftime throws an error that it needs to be a number.
journalctl -n1 --output=json | jq '.__REALTIME_TIMESTAMP | tonumber |= (. / 1000 | strftime("%Y-%m-%d")), .MESSAGE'
but I get invalid path expression errors. I assume I don't have the syntax down right.
I ultimately want to display key __REALTIME_TIMESTAMP in human readable format and key MESSAGE.
journalctl -n1 --output=json)? You can't modify the result oftonumberwith|=(the left-hand side of that operator must be a path within the document). – Kusalananda Nov 11 '23 at 22:00