Database

[{"_id":"12sdsd","TotalStudent":"12","TotalPresent":"23"},{"_id":"22fdf","TotalStudent":"25","TotalPresent":"32"},{"_id":"21s2sd2","TotalStudent":"1,233,273","TotalPresent":"2,445,232"}]

Query

db.collection.aggregate([{$addFields:{TotalStudent:{$reduce:{input:{$split:["$TotalStudent",","]},initialValue:"",in:{$concat:["$$this","$$value"]}}},TotalPresent:{$reduce:{input:{$split:["$TotalPresent",","]},initialValue:"",in:{$concat:["$$this","$$value"]}}}}},{$group:{_id:"",TotalStudents:{$sum:{$toInt:"$TotalStudent"}},TotalPresent:{$sum:{$toInt:"$TotalPresent"}}}}])

Result