I am using PHP Mongo extension to connect to Mongo DB server. The problem is that even though I insert the values into Mongo DB as objects, I am always getting the results in Array format when I use find
or findOne
in PHP. I found it really ugly and hacky.
Is there a way to make PHP retain the original structure as it is in Mongo DB ?