Infosys interview question

How would you handle this situation in MongoDB?