Load published JSON of Google Spreadsheeet.
- Load JSON of Google Spreadsheet
- Parse the JSON to data collection
- Some getter methods are available
- jQuery 1.7+
You need to get the url from Google Spreadsheet you want to load, as below.
- Open your spreadsheet
- [File] > [Publish to the Web] > [Publish now]
- Get a link to the published data as "cells" of "ATOM"
var url, loader;
url = ""; // Set your url
loader = new SpreadSheetLoader(url);
loader.on("ready", function(){
var data = this.getData();
// do something
});
loader.load();
Get all the data as array.
// example
var myData = loader.getData();
Get items whitch match the condition passed as object.
// example
var myItems = loader.getItem({ type : "drink", price : 500 });
Wrapper of jQuery.fn.each
// example
loader.each(function(i, item){
console.log(item);
});
- 0.9 release