I am trying to loop through a nested dictionary and print the key and value for every item in the dictionary. How may I achieve this?
Example Dictionary:
{'conversation_end': '2021-11-03T13:44:10.896000+00:00',
'conversation_id': '560904d6-5997-4ae2-a234-gfgfgfgf',
'conversation_initiator': None,
'conversation_start': '2021-11-03T13:41:22.603000+00:00',
'division_ids': ['7ef8bfd4-e12e-4310-90a1-fafg'],
'evaluations': None,
'external_tag': None,
'knowledge_base_ids': None,
'media_stats_min_conversation_mos': 4.872452259063721,
'media_stats_min_conversation_r_factor': 92.01608276367188,
'originating_direction': 'inbound',
'participants': [{'external_contact_id': None,
'external_organization_id': None,
'flagged_reason': None,
'participant_id': 'c844a53c-70bf-441d-81ce-cccd572baf08',
'participant_name': '',
'purpose': 'customer',
'sessions': [{'active_skill_ids': None,
'acw_skipped': None,
'address_from': None,
'address_other': None,
'address_self': None,
'address_to': None,
'agent_assistant_id': None,
'agent_bullseye_ring': None,
'agent_owned': None,
My current code looks like this.
<table class="table table-bordered table-success">
{% for key, value in data.items %}
<tr>
<td> {{ key }} </td>
<td> {{ value }} </td>
</tr>
{% endfor %} {% endblock %}
</table>
I do not want participants like the way it is below and want to continue displaying the key, value of every item in the dictionary as the items above participants.