lets say:
a = [1,1,2,2,3,3,3,3,4,4,4,4]
b is dict
I want b as dict which represents number of occurrence of items in a:
I want jinja2 template that create output as below.
Output of b should be, ( key - itemName, Value - corresponding item occurrence in list)
1 : 2
2 : 2
3 : 4
4 : 4
Is it possible to do via jinja2 template - i have jinja engine which renders some output i want to add this kind of stuff in template.