disarm-dev / douma-app

DiSARM app (2018 and beyond)
MIT License
3 stars 1 forks source link

CSV export of data #31

Closed onlyjsmith closed 6 years ago

onlyjsmith commented 6 years ago

The system shall allow for the direct export of all records in csv format, with all form data elements separated by commas

Approaches:

  1. use a json-to-csv library to flatten (see below)

  2. manual steps:

    • [x] iterate all records once to create array of unique form fields,
    • [x] iterate all records again, to create row with each field (blank where no value)
    • [ ] dump as text

Library options:

onlyjsmith commented 6 years ago

@Nicolaidavies as per PR, please review and merge or send back!