私は変数を更新のキーに設定していません、私のコード...
mongoose.model('members', Schema).update({ id: '0' }, {$push: {'this_key': 'value'}} , [], function (err, data){});
私が使用する場合
var this_key = 'test';
しかし、this_key は「test」ではなく、「this_key」です
mongoose.model('members', Schema).update({ id: '0' }, {$push: {this_key: 'value'}} , [], function (err, data){});
変数 this_key を設定するには、値 ext POST[] を取得する必要があります。
mongoose、Node.jsで変数ごとにキーを設定する方法は?