Extract all exif data as list into a json file:
exiftool -j -q dir > data.jsonSort the exif data by the original creation time:
jq 'sort_by(.DateTimeOriginal)' data.jsonExtract exif data and sort by original creation time:
exiftool -j -q *.jpg | jq 'sort_by(.DateTimeOriginal)' > data.json
I’m not entirely sure what you want to achieve, but this should be a solution (let me know if this is not the case or you have another case in mind):
If you want to have the exif data of just a single file, call
exiftoolonly on that file and extract the first (and therefore only) element of the array usingjq: