I have a bunch of JSON with dates in ISO format. How can I print only the year component of the date?
$ echo '{"createdDate": "2005-09-28T16:34:40Z"}' | jq '{ createdYear: ??? }'
{
"createdYear": "2005"
}
I have a bunch of JSON with dates in ISO format. How can I print only the year component of the date?
$ echo '{"createdDate": "2005-09-28T16:34:40Z"}' | jq '{ createdYear: ??? }'
{
"createdYear": "2005"
}