I have the same format of nested dictionaries within a list. I am trying to iterate through every element and find the number of time we have values for summary as through the API and also count the number of assignees for through the API.
[{'id': '101',
'type': 'log_file',
'summary': 'Escalated to Mark through the API',
'assignees': [{'id': 'xyz',
'type': 'user_reference',
'summary': 'Mark'}]},
{'id': '102',
'type': 'log_file',
'summary': 'Escalated to Kevin by SMS',
'assignees': [{'id': 'abc',
'type': 'user_reference',
'summary': 'Kevin'}]},
{'id': '103',
'type': 'log_file',
'summary': 'Escalated to Scott through the API',
'assignees': [{'id': 'pqr',
'type': 'user_reference',
'summary': 'Scott'}]}]
In the sample above, I expect a count of 2 for number of times through the API has returned for summary and the assignee value as Mark and Scott as these two different people have been assigned.