I have a list with several elements that are created dynamically, each of which has two sub-elements, which are the quantity and code after the database query has to update the quantity, but to make the code more readable, I would like to access the sub-items using a key, not its index, something like:
subelement ["quantity"]
but I don’t see how to assign a key, although collections.
source
share