The problem is, sometimes it’s nice to have a list to loop over especially if the client code doesn’t know the keys.
Other times it would be nice to have a dict if you have the key since writing loops can be messy.
I think it would be very nice in these cases to have a dict_to_list adapter and list_to_dict adapter as jinja2 plugins, so the original datastructure can be whichever.
selectattr and map are new to version 2.7. The 'equalto' test is the problem you'll run in to.
So the map function with an optional selectattr provides the dict_to_list function you are looking for. (Your gist wouldn't load.) I don't see how a general purpose list_to_dict would be possible without some specific logic be written.