google-spreadsheet-as-json
v1.0.0
Published
Reads a google spreadsheet as json
Downloads
2
Maintainers
Readme
google-spreadsheet-as-json
Use a google spreadsheet as a json store
Usage
In your spreadsheet, go to File > Publish to the web and click on "Web Page" drop down and select "Comma-separated values"
and then copy the link. Assuming the link is in the variable link
.
const fetchStore = require('google-spreadsheet-as-json');
fetchStore(link, (err, data) => console.log(data));
For a csv containing:
partner,state,date
all,karnataka,05/02/2018
other,delhi,05/02/2018
The output will be:
{
all: {
karnataka: [ '05/02/2018' ]
},
other: {
delhi: [ '05/02/2018' ]
}
}