0

I cant do the following:

let way = `Configuration.filters.${name}`
<schema>.findOneAndUpdate({ <query> }, { $set: { way: true } })

The variable "way" just dont works.

South
  • 1
  • The duplicate is definitely related, but it's not a direct answer for this question. This question is basically, "How can I create a reference to an object property that acts like a settable/gettable alias for the property?" The answer is that you can't, or at least not with out way more work than it'd be worth. – Pointy Mar 13 '22 at 22:33

0 Answers0