How to use callback option in sheetrock.js? I'm trying to get the output from the sheetrock as a variable to be used as input for another function, but having difficulty due to my limited JS knowledge. Any help please?
var d = new Date();
var month = new Array();
month[0] = "Jan";
month[1] = "Feb";
month[2] = "Mar";
month[3] = "Apr";
month[4] = "May";
month[5] = "Jun";
month[6] = "Jul";
month[7] = "Aug";
month[8] = "Sep";
month[9] = "Oct";
month[10] = "Nov";
month[11] = "Dec";
var n = month[d.getMonth()];
var y = d.getFullYear();
$("#value").sheetrock({
url: 'https://docs.google.com/spreadsheets/d/1XSVP75fJkq34gLHhwIsEWOC3My-6xnbVURk4U_wotD0/edit#gid=0',
query: "select C where B = "+ y +" and A = '"+ n +"'",
callback: draw
});
function draw(data, sheetrock,response) {
console.log(); // how to get the output from sheetrock as a variable?
}