"contact_groups": [
{
"contacts": [
{
"type": "phone",
"value": "+73903124090",
},
{
"type": "phone",
"value": "+73903122241",
},
{
"type": "phone",
"value": "+73903124024",
}
]
}
],
for contacts in listing['contact_groups']:
for contact in contacts['contacts']:
if (contact['type'] == 'phone'):
com_phones = contact['value']
else:
com_phones = ''
com_phones = []
if ('contact_groups' in listing):
for contacts in listing['contact_groups']:
for contact in contacts['contacts']:
if (contact['type'] == 'phone'):
com_phones.append(contact['value'])
else:
com_phones = ''
print(com_phones) # Тут список телефонов