Hi a am try to do rest api in spring boot with mongodb to find group by count the input data look like. please share any logic, code, example link. guys i am expecting spring boot logic. how mongodb aggregation framework integrating.
{
"_id" : "PRODUCT_01",
"productname" : "product1",
"value" : "codesoft"
},
{
"_id" : "PRODUCT_01",
"productname" : "product2",
"value" : "codesoft"
},
{
"_id" : "PRODUCT_01",
"productname" : "product1",
"value" : "codesoft"
}
expected output { product1 : 2, product2 : 1 } Any help is appreciated.