I am trying to use aggregate function on parse-server JS SDK
var pipeline = [
{ group: { objectId: '$league_id'} }
];
var query = new Parse.Query("Fixture");
return query.aggregate(pipeline)
.then(function (results) {
return results;
})
.catch(function (error) {
throw error;
});
When I run this functions it gives correct number of groups for league_id but it contains null data
{
"result": [
{
"objectId": null
},
{
"objectId": null
}
]
}
What I am missing in here ? What can I do for getting other fields in result
It seems like there is already an issue for this https://github.com/parse-community/parse-server/issues/5989#issuecomment-526007093
It is fixed in 3.9.0