dimanche 9 mai 2021

GroupBy in mongodb and fetch all the values from the collection

this is the sample data.Need to groupby competition_id. Need all data from the collection after group by. kindly help to check on this. Thanks in advance


{
    "id": "l5ergph87pgdr8k",
    "season_id": "",
    "status_id": 13,
    "venue_id": "",
    "referee_id": "",
    "neutral": 0,
    "note": "",
    "home_scores": [0, 0, 0, 0, 0, 0, 0],
    "away_scores": [0, 0, 0, 0, 0, 0, 0],
    "home_position": "",
    "away_position": "",
    "coverage": {
        "mlive": 0,
        "lineup": 0
    },
    "round": {
        "stage_id": "",
        "round_num": 0,
        "group_num": 0
    },
    "updated_at": "2021-05-01 18:47:55",
    "competition_id": "kjw2r09hx9drz84",
    "competition_name": "Australia Gold Coast Reserves",
    "home_team_id": "3glrw7h1d2oqdyj",
    "home_team_name": "Palm Beach Reserves",
    "away_team_id": "n54qllh8941qvy9",
    "away_team_name": "Nerang B Reserves",
    "match_time": "2021-05-01 13:45:00",
    "match_tsp": 1619847900,
    "created_at": "2021-05-04 14:33:10"
}


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Q7KFBI
via IFTTT

Aucun commentaire:

Enregistrer un commentaire