SOLUTION FOR THIS IS AS FOLLOW
const fil_arr=;
DO?fil_arr.push({
DO: {
$in: DO,
}
}):null;
GPC?fil_arr.push({
GovermentPaddyCenter: {
$in: GPC,
},
}):null;
TN?TN.map(x=>({Truck:{TruckNumber:x}})).map(x=>{fil_arr.push(x)}):null;
GP?GP.map(x=>({Truck:{Gate:{GatePass:x}}})).map(x=>{fil_arr.push(x)}):null;
// return fil_arr
console.log(‘fil_arr’,fil_arr);
const get_ido = await strapi.entityService.findPage('api::ido.ido',{
page:1,
pageSize:20,
sort: { id: 'DESC' },
filters:{
$or: fil_arr
},
populate: {
'Truck':{
populate:{
'Gate':true
}
},
'Paddy':{
populate:{
'paddy_variety':{
select:['id','Name']
}
}
}
},
});