I would like to update property value, which has dynamically set property name, but I can't figure out how to do it.
So I have an object like this, which has dynamically set property name (not value, the 'asd' - property name).
{period: "2020", asd: "5"}
Object is created like this:
let myTestObject = {
period: "2020",
[name]: "5"
};
Now when I want to update this object, I would assume it works like this, but it doesn't:
myTestObject.[name] = "new value"