Comment yml file to conf using jinja2 templating

I have a yml as a list of dictionary like sample below :

Section1 :
  - { k1 : V1 , K2 : V2 }

Section2 :
  - { k1 : V1 , K2 : V2 , K3 : V3 }

In my yml file the actual section names keeps varying. They're of very different names.

Is there a way to loop through these sections using j2 templating ?

Kindly suggest.