Database

[{"branchName":"Branch1","products":[{"name":"Chocolate","quantity":NumberInt(2),"price":"64"},{"name":"Torta Galaxy","quantity":NumberInt(2),"price":"30"},{"name":"Torta Chocolate","quantity":NumberInt(1),"price":"91"}]}]

Query

db.collection.aggregate([{$unwind:"$products"},{$project:{"_id":0,"branchName":"$branchName","name":"$products.name","quantity":"$products.quantity","price":"$products.price","subtotal":{"$multiply":["$products.quantity",{"$toDecimal":"$products.price"}]}}}])

Result