Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 2
    Your answer is valid, but has no discernible advantage over the simpler (shorter) answer already given elsewhere on this page (jq -s .); in this case, simply using -s might actually be faster as the processing done by -s is all written in C. Commented Nov 20, 2020 at 3:43
  • This is more flexible, though, as it can also be applied in sub-expressions rather than only affecting the top-level expression (so this is what solved my problem, so +1 from me). Commented Sep 19, 2024 at 12:06