扫码关注官方订阅号
{"name":"test","tag":[{"tname":"a","ttype":"atype"},{"tname":"b","ttype":"btype"}]}
想往mongod里插入类似于上面的数据(数据中有一个内嵌的列表),直接在mongo的shell里进行操作,应该怎么写呢?
好吧 自问自答好了
db.test.insert({ "name":"test", "tag":[ {"tname":"a","ttype":"atype"},{"tname":"b","ttype":"btype"} ] });
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
好吧 自问自答好了