Skip to content

Instantly share code, notes, and snippets.

@ziterz
Created December 22, 2020 04:12
Show Gist options
  • Save ziterz/c63cca4f6cc219140fa00c6786f2756e to your computer and use it in GitHub Desktop.
Save ziterz/c63cca4f6cc219140fa00c6786f2756e to your computer and use it in GitHub Desktop.
filtering - [title]
// filtering - [title]
if (filter != '' && typeof filter !== 'undefined') {
let query = filter.title.split(',').map(function(item) {
return {
[Op.iLike]: '%' + item + '%'
}
});
paramQuerySQL.where = {
title: { [Op.or]: query }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment