Skip to content

Instantly share code, notes, and snippets.

@hmpmarketing
Last active January 12, 2018 12:26
Show Gist options
  • Select an option

  • Save hmpmarketing/4559f9e2782d3e0a646491f82416d3f5 to your computer and use it in GitHub Desktop.

Select an option

Save hmpmarketing/4559f9e2782d3e0a646491f82416d3f5 to your computer and use it in GitHub Desktop.
let ispsArr = mysql.IspWhitelist.findAll({
where:{iso_code:'GB'},
attributes: ['isp_name'],
}).then((isps) => {
let ispsArr=[];
isps.forEach(function(isp) {
ispsArr.push(isp.isp_name)
})
console.log(ispsArr) //Gives me the array
return ispsArr;
});
console.log(ispsArr) //?Promise {...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment