Thanks for the reply. It was not created from a MongoDB database, I created that report with a Perl script and uploaded it there. Now I have some reports like this in the MongoDB and I want to do the opposite operation - get the data back in a specific format. Just looking for a query suggestion so I can play with it in the MongoDB playground. It feels not so hard but I got stuck with it for some reason