I am trying to access elements of a dict with keys that start with the underscore character. For example:
my_dict = {\"_source\": \'xyz\'}
I\'m
In my case, if I know the dict elements, and it's only one, I prefer to rename the dict key using pop:
pop
my_dict['new_key'] = my_dict.pop('_old_key')
That way I get a new name on the dict, and I can access in the template without problems.