I have a history collection that returns json as follow:
{
"id": "60f53b546b089f10e96c0206",
"workspace": null,
"remote_url": "http://172.16.4.105:7990/scm/tes/docker-hello-world-spring-boot.git",
"status": "SUCCESS",
"branch": "origin/master",
"description": "",
"date": "2021-07-19 10:44:04",
"project_id": "60ef4cccc3d2d312c81eab44",
"build_id": "362",
"type": "back",
"backup_path": "/root/backups_api/backup_362"
}
I want to group count of success and failure status by month using mongotemplate in Springboot API.