So, I have this Ansible data structure (variable):
variable:
identifier_1:
- 1
- 2
- 1
- 1
identifier_2:
- 1
- 2
- 3
and I need to turn into a dictionary like:
variable:
indentifier_1:
- 1: 3
- 2: 1
identifier_2:
- 1: 1
- 2: 1
- 3: 1
I've tried to apply the logic that is used in the above link but couldn't translate it to my use case since my list items are simply numbers.