I try to get result from another function and use that return values. But context.functions.execute only works when I return the values immediately. It means that if I use this way, it works perfectly:
exports = () => {
var res;
res = context.functions.execute("listTodayBookings");
return res
But not this way
exports = () => {
var res, compare;
var today = new Date();
var h = today.getHours() + 7; //GMT +7
var m = today.getMinutes();
var time = h + ":" + m;
res = context.functions.execute("listTodayBookings");
for (let k in res) {
console.log(k, res[k])
}
res will be undefined and print nothing. Any helps are appreciated.