代码 {
"env":"chunlin-5d5ie",
"query": "db.collection(\"Question\").where({nameid:\"8\"}).update({data:{question:_.pull({sort:\"2\"})}})"
}
报错 {"errcode":-605101,"errmsg":"RuntimeError: cannot read property 'pull' (from line 1, col 72 to line 1, col 76)\n\n> 1 | db.collection(\"Question\").where({nameid:\"8\"}).update({data:{question:_.pull({sort:\"2\"})}})\n | ^^^^ hint: [QFNCOPI2e-EZ.J_a]"}
请问是什么问题 不能使用_,pull 吗?
没有用data: {
errcode: -605101,
errmsg: "RuntimeError: cannot read property 'pull' (from line 1, col 112 to line 1, col 116)\n" +
'\n' +
`> 1 | db.collection("cat_good").doc("7rrM9FHrDoJYLnPuvqqEfLfs2JUOnC4cOunu8ZZoM2OjqrGi").update({data:{pic:db.command.pull('cloud://catshoptest-8uqdw.6361-catshoptest-8uqdw-1302337919/cat_goods/1594698835947-0.11420196133279226-Penguins.jpg')}})\n` +
' | ^^^^ hint: [0fGdOPI2e-acnEvA]'
}
可以将 _ 替换为 db.command 试试看