Hacker News new | ask | show | jobs
by dewey 1621 days ago
That would only work if it's line separated JSON though. If you cut off the first 1000 lines of a big JSON file it will be invalid.
1 comments

Then, use

  jq —-compact-output '.' | head -10 | foo
That is also useful for grepping to filter on records of interest.

jq also has --stream for handling large inputs.