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*

9
  • 2
    I added: where and how did you add it? Please post the full command that you have tried. Please post sample data from data.json, enough so others can test it. Commented Aug 8, 2020 at 20:30
  • Thanks for asking, the full command is: echo "column1, column2, column3" > test.csv && cat data.json | jq -r '. | [.["column1"], .["column2"], .["column3"]] |select(.column3| startswith ('abc')) | @csv’ >> test.csv Commented Aug 8, 2020 at 20:32
  • 1
    @KamilCuk it’s hard to come up with the Json.data example though Commented Aug 8, 2020 at 20:58
  • 2
    Please give an indicative example of data.json -- one that is both illustrative and sufficient to replicate the error. Commented Aug 8, 2020 at 20:59
  • @peak I have added an example of the json.data { "column1": "hello", "column2": "bye", "column3": "abc" } Commented Aug 8, 2020 at 21:16