Below is my helper function
async function getPriorityList(operatorId) {
let result = await Api.getApisDetail(operatorId);
return result;
};
and below is my modal function
static getApisDetail(operatorId) {
return db.query(
`select id, api_name, api_type,(select priority from api_switching where api_switching.api_id=api_master.id and operator_id=${operatorId}) as priority,(select isActive from api_switching where api_switching.api_id=api_master.id and operator_id=${operatorId}) as isActive from api_master where api_type='Recharge' order by api_name asc`
);
}