Hi Im still learning node and trying something cool with javascript nodejs. Meanwhile I got stuck when pass separate "where" sequelize statement into one. Okay, this is my current code :
var periodsParam = {};
periodsParam = {
delete: 'F',
tipe: 1,
variantid: (!ctx.params.id ? ctx.params.id : variants.id)
};
if (ctx.query.country) {
periodsParam = {
country: ctx.query.country
};
}
console.log(periodsParam);
From code above, its always return { country: 'SG' } , but I want to return { delete: 'F', tipe: 1, variantid: 1, country: 'SG' }
How can I resolve that ?
Anyhelp will appreciate, thankyouu.