When working in Javascript, I defined an object as follows:
this.view.objectExample.accessibilityConfig= {
'propertyA': 1,
'PropertyB': 2,
'PropertyC': 3
};
I attempted to add a new property during runtime but encountered an error saying "Cannot set properties of undefined".
An example of the code used is:
this.view.objectExample.accessibilityConfig.propertyD['flag'] = true;
What is the correct way to define a new property like this?
I also attempted it in this way:
this.view.objectExample.accessibilityConfig.propertyD.flag = true;