db.collection('todos').where({ 'root.objects.1.numbers.2': 70}).get()
这里的数字传变量进去会被认为是元素,要怎么处理?
加个中括号
var x = 1,y = 2
var key = ‘root.objects.’ + x + ‘.numbers.’ + y
db.collection(‘xxx’).doc(‘sss’)
.update({
data: {
[key]: 70
}
})