I have many event with the following format:
EVENT 1
{
'colors': [
{'color': 'red', 'appearances': 3},
{'color': 'blue', 'appearances': 2},
...
{'color': 'yellow', 'appearances': 4}
}
EVENT 2
{
'colors': [
{'color': 'green', 'appearances': 1},
{'color': 'blue', 'appearances': 4},
...
{'color': 'yellow', 'appearances': 2}
}
I want to accumulate the field appearances after verifying each event grouped by the field color to have the following output:
| ---------------------------------------------------------------------------------- |
| Color | Appearances |
| ---------------------------------------------------------------------------------- |
| blue | 6 |
| red | 3 |
| yellow | 6 |
| green | 1 |
| ---------------------------------------------------------------------------------- |
Does anyone know how to obtain this result, I have been playing with mv functions, but I am not able to produce the expected output.
... View more