Iterate a dict over loop: different key value pair

Is there any way to iterate over a dict with different key - value pair in ansible?

Suppose I have a dict like below:

Rahul,

Right now, packages is a list with 2 items, and each item is a dict with one key/value pair.

If you’re the one generating packages, I’d rewrite it as a dict:

`