Created
April 23, 2015 13:39
-
-
Save andreaj8/70137ec2d616430b8b7a to your computer and use it in GitHub Desktop.
Save CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json2csv({ | |
data: usersArray, | |
fields: ['name', 'email', 'gender', 'birthday', 'created', 'address', 'img', 'platform', 'used', 'scratched', 'winning', 'changed', 'welcomeKit', 'gift', 'invalidated', 'games'], | |
del: ';' | |
}, | |
function (err, csv) { | |
if (err) return res.json(500); | |
res.set({ | |
"Content-Disposition": "attachment; filename=o_o.csv" | |
}); | |
return res.send(csv); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment