i've a list that looks like this
for i in negocio:
params = {
'term': i,
'fields': 'title',
'exact_match': 'true'}
response = client.deals.search_deals(params=params)
deal_id.append(response)
deal_id
after deal_id run, i receive back these list.
[{'success': True,
'data': {'items': [{'result_score': 1.28568,
'item': {'id': 151897,
'type': 'deal',
'title': 'deal_1',
'value': None,
'status': 'open',
'visible_to': 7,
'owner': {'id': 13863990},
'person': {'id': 209102,
'organization': None,
'custom_fields': [],
'notes': []}}]},
'additional_data': {'pagination': {'start': 0,
'limit': 100,
'more_items_in_collection': False}}},
{'success': True,
'data': {'items': [{'result_score': 1.28568,
'item': {'id': 151898,
'type': 'deal',
'title': 'deal_2',
'value': None,
'status': 'open',
'visible_to': 7,
'owner': {'id': 13863990},
'person': {'id': 331122,
'organization': None,
'custom_fields': [],
'notes': []}}]},
'additional_data': {'pagination': {'start': 0,
'limit': 100,
'more_items_in_collection': False}}}]
How can i keep just the numbers inside these pieces of my list 'item': {'id': 151897}
, and 'item': {'id': 151898}
I looked on similar topics but don't found a anwser that could help me