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.

Required fields*

6
  • 1
    This works good for simple JSON but what about JSON with nested properties that go down many levels? Commented Dec 28, 2017 at 21:14
  • This of course sorts the keys. Also the output of unique is sorted anyway, so unique|sort can be simplified to unique. Commented Apr 24, 2018 at 22:32
  • 5
    @TJR When using this filter it is mandatory to switch on raw output using -r option. Otherwise all the quotes " become extra-escaped which is not valid CSV. Commented May 13, 2019 at 15:01
  • 1
    Amir: nested properties don't map to CSV. Commented Jun 13, 2019 at 11:02
  • 2
    @Amir: adding to chrishmorris' comment, this question is explicitly restricted to "array[s] of objects with scalar properties (no deep/complex/sub-objects, as flattening these is another question)". Commented Jun 23, 2021 at 22:48