I have the following nested object with objects and arrays :
'ecommerce': {
'[dynamicvalue]': {
'actionField': {'step': 4},
'products': [{
'name': 'Spirit Pack',
'id': '12345',
'price': '55',
}]
}
I'd like to extract the product array however I don't know the second property name, it's a dynamic value changing all the time.
Normally I should be able to do something like this var x = ecommerce.[dynamicvalue].products
However since I never know this second value how can I do?