That won’t scale well to files approaching or exceeding system RAM, though.
Also, unless it’s the coloring you’re concerned with, you could replace the pipe to jq with pprint, a native Python library.
Also, unless it’s the coloring you’re concerned with, you could replace the pipe to jq with pprint, a native Python library.
And it's true that it won't scale well but it still has worked every time I've wanted it to :)