I have the following list of dictionaries:
l = [{'cycleIndex': 1, 'amount': 100},
{'cycleIndex': 1, 'amount': 200},
{'cycleIndex': 2, 'amount': 1000},
{'cycleIndex': 2, 'amount': 2000}]
I want to print out 200 and 2000 which are the values in the second dictionary "where" cycleIndex is repeated.
I basically want to select a specific value for a given element (which are dictionaries in this case, hence "value") in a list, filtering by another value within that dictionary.