How to use field value as key name in Mongodb result

后端 未结 2 798
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 03:23

Can somebody tell me please if is possible to use field value as key in mongodb result. If I have documentes like

{\'code\': \'xxx\', \'item\': \'yyy\'}
{\'         


        
2条回答
  •  情深已故
    2020-12-11 04:25

    I don't think thats possible. Mongo leaves the interpretation of the result to the application. Thats why mongodb is a shema-less database.

提交回复
热议问题