MongoDB NodeJs driver interprets field name in update operation

Viewed 14
let data = await fetchDictionary();
let query = { isin: product.isin };
await watchlist.updateOne(query, { $set: data });

The field named "Avg Volume" get's interpreted by the engine, as reported in the mongodb admin website:

Avg: {
        ' Volume': '765563'
    },

I would expect this:

'Avg Volume': '765563',

Any idea about what I am doing wrong?

0 Answers
Related