I have below sample structure
'_id': 1
'company': 'XXX'
'numberOfProducts': 2
'products': [
{'sku': 'cnx1cs', 'name': 'canon', 'qty': 3},
{'sku': 'nkx1cs', 'name': 'nikon', 'qty': 2}
]
When I use this {{list_of_assets.products.0.name}}
notation inside of the html file (in Django), it seems much more comfortable instead of using dict.items()/dict.iteritems()
especially when you think much more nested arrays.
But I could not figure out how I can control array item number inside of the for loop...
I mean if we think above sample, how can I iterate for loop two times and produce below notation by somehow using variable inside of the tag
{{list_of_assets.products.0.name}}
....
{{list_of_assets.products.1.name}}
regards