mlr --json tail -n 2 data.json

Category: Data Science & Analysis

mlr --json tail -n 2 data.json

Show the last 2 records of a JSON file

The tail verb prints the final records of a JSON input, here the last 2 objects in the array. This is the record-aware counterpart to the tail command for text. Combined with --json input, it is a quick way to check how a JSON dataset ends. Note that the -n flag counts records, not lines.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.