Mongodb – I have a json object with array object inside, how to access array object and if same product display only once and sum the price
This is my json let obj = [{ "_id" : "WER12345", "date" : "2022-07-24", "totalproduct" : 6, "productlist" : [ { "product" : "iphone 13", "price" : 1000 }, { "product" : "iphone 12", "price" : 800 }, { "product"…