function isIE () {
var myNav = navigator.userAgent.toLowerCase();
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
}
function save(data) {
if(isIE() == 9) {
// Solution was taken from
// http://megatuto.com/formation-JAVASCRIPT.php?JAVASCRIPT_Example=Javascript+Save+CSV+file+in+IE+8/IE+9+without+using+window.open()+Categorie+javascript+internet-explorer-8&category=&article=7993
// var URI = 'data:text/plain;charset=utf-8,';
// Prepare data
var testlink = window.open("about:blank", "_blank");
testlink.document.write(data); //fileData has contents for the file
testlink.document.close();
testlink.document.execCommand('SaveAs', false, path);
testlink.close();
} else {
var blob = new Blob([data], {type: "text/plain;charset=utf-8"});
saveAs(blob, path);
if(cb) res = cb(res);
}
}
var res = alasql('SELECT COLUMN _ FROM ? WHERE x = ? AND y = ?',[array, 1,1]);
var getByColor = alasql('SELECT COLUMN _ FROM ? WHERE x = ? AND y = ?');
var obj = getByColor([array,1,3]);