Database

[{"confirmed":[{"confirmed":100}],"denied":[{"denied":50}],"pending":[{"pending":20}]}]

Query

db.collection.aggregate([{$unset:"_id"},{$project:{res:{$objectToArray:"$$ROOT"}}},{$project:{res:{$map:{input:"$res",in:{category:"$$this.k",count:{$objectToArray:{$first:"$$this.v"}}}}}}},{$project:{res:{$map:{input:"$res",in:{category:"$$this.category",count:{$first:"$$this.count.v"}}}}}},{$unwind:"$res"},{$replaceRoot:{newRoot:"$res"}}])

Result