Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
JSON -> CSV challenge
Rebol [
version: 0.0.3
json: load-json
file: to-file format/pad [-4 -2 -2] reduce [now/year now/month now/day ".csv"] 0
csv: open/write file
write csv join "name,creditcard" newline
remove-each rec json [none? rec/creditcard]
write/lines csv map-each rec json [ajoin [rec/name "," rec/creditcard]]
close csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.