set property of Object in Array
I have an Array of Objects like so:
manualInputHeaders = [
{text: 'Store No', title: 'Enter Destination Store Number'},
{text: 'Promise Date', title: 'Enter promise ship data', classes:
{classAdditions: 'tooltipInput'}}
]
I'm trying to set with
manualInputHeaders[0].classes.classAdditions = 'setMe'
However, chrome console gives:
Uncaught TypeError: Cannot set property 'classAdditions' of undefined
How can a property of an Object within an Array be set?
No comments:
Post a Comment