I want to add the value (number) of "coinId" as a key to the inner object to the MongoDB database. But it takes literally the name of the variable. How do I access its value?
const { result } = await db.collection('users').updateOne(
{ googleId },
{
$set: { description: { coinId: { _id, coinId, description, date } } },
},
{
returnOriginal: false,
}
);