Database
[{"_id":2,"ProductField":{"PageCount":2,"ProductDetailFields":[{"PageNumber":1,"ProductDetailInfo":[{"RowIndex":0,"ProductScore":{"Name":"Samsung","Rating":99},},{"RowIndex":1,"ProductScore":{"Name":"Nokia","Rating":96},},{"RowIndex":2,"ProductScore":{"Name":"Apple","Rating":80},}]}]}},{"_id":1,"ProductField":{"PageCount":2,"ProductDetailFields":[{"PageNumber":1,"ProductDetailInfo":[{"RowIndex":0,"ProductScore":{"Name":"Sony","Rating":93}},{"RowIndex":1,"ProductScore":{"Name":"OnePlus","Rating":93}},{"RowIndex":2,"ProductScore":{"Name":"BlackBerry","Rating":20}}]}]}}]
Query
db.collection.aggregate({$addFields:{"ProductField.ProductDetailFields":{$map:{"input":"$ProductField.ProductDetailFields",as:"pdf",in:{$filter:{input:{$map:{"input":"$$pdf.ProductDetailInfo",as:"e",in:{$cond:[{$gte:["$$e.ProductScore.Rating",99]},{$mergeObjects:["$$e",{PageNumber:"$$pdf.PageNumber"}]},null]}}},as:"i",cond:{$ne:["$$i",null]}}}}}}},{$addFields:{"ProductField.ProductDetailFields":{"$arrayElemAt":["$ProductField.ProductDetailFields",0]}}})