I would like to thank each one of you, who spared time for going through the problem statement. As a part of good gesture, i am posting the final code-snippet that worked for me, after suggestions by @ekhumoro, @OldBoy , @KlausD, @deceze
for key, each_items_in_json in respJson.items(): ---suggested changes by @ekhumoro
if key=='cart': ---suggested changes by @ekhumoro
for items_in in each_items_in_json:
if items_in['benefit_id']!='-1':
if items_in['plan_id']!='-1':
if items_in['change']== 0:
if items_in['id'] is not None:
storeListsItemsFromJSON["user_id"]=items_in['id']
storeListsItemsFromJSON["mid-term"]= False
JSONtoUseInNextAPI=json.dumps(storeListsItemsFromJSON)