Data elements - JS Object seems to not allow arrays
I am trying to implement the W3C standard for a data layer but have run into a snag. Looks like arrays are not allowed in the path for a JS object in a data element. For example, this only returns an empty string in a data element but returns the expected value in the console:
digitalData.user[0].profile[0].profileInfo.userName
Anything I should be doing differently?