Recently, I stumbled upon the following code snippet:
data = [
0: {kilos: 10},
1: {other:1, kilos: 5},
2: {other:2, kilos:6}
]
After analyzing it, I realized that I need to extract all the values associated with the "kilos" keys and then calculate their sum. Unfortunately, I'm struggling with how to achieve this outcome.
The data in question is retrieved from a Firestore database. Could someone guide me on how to tackle this problem?