items['ids']
[
{
'id': '11891',
'availability': 'IsNotThere',
},
{
'id': '11892',
'availability': 'IsThere',
},
{
'id': '11893',
'availability': 'IsThere',
},
{
'id': '11894',
'availability': 'IsNotThere',
},
{
'id': '11895',
'availability': 'IsNotThere',
},
{
'id': '11896',
'availability': 'IsNotThere',
},
{
'id': '11897',
'availability': 'IsNotThere',
},
{
'id': '11898',
'availability': 'IsNotThere',
},
{
'id': '11899',
'availability': 'IsNotThere',
},
{
'id': '11900',
'availability': 'IsNotThere',
}
]
id_list = [i for i in products['skus'] if i.get("id")]
for i in id_list:
if i['availability'] == 'IsThere':
print(i)