We have written below JQL query but it's not working can you please help us with this..
var params = {
from_date: '2019-06-13',
to_date: '2019-06-14'
}
function main() {
var peopleCollection = People();
var collectionEvents = Events({
from_date: params.from_date,
to_date: params.to_date
})
.joinByuser(function(collectionEvents, peopleCollection) {
var array = Array();
for (var i = 0; i < peopleCollection.length; i++) {
for (j = 0; j < collectionEvents.length; j++) {
if (peopleCollection[i].distinct_id == collectionEvents[j].distinct_id) {
array.map[collectionEvents[j]];
}
}
}
return eventarray }
);
}