3 ms·
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.
by dewey 5y 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.
- Someone 5y agoThen, 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.