I have a NodeJS server that takes data from two different API's, and then I want to combine the result from both in one JSON response. Here I am sending you the code:
EventModal.eventSearch(eventReq, type, async function (eventRes) {
EventModal.getBoostEvents(eventReq, type, async function (eventBoostRes) {
res.json({
status: true,
data: eventRes,
eventBoostRes: eventBoostRes,
});
});
});
I want eventRes
and eventBoostRes
in one response in data
.So how can I achieve that ?
eventRes
and eventBoostRes
are query result.
Thanks in advance.