i want to remove the json data from the list based on the allocation.If allocation:True then, that particular josn should remove from the dictionary. in the below data {"paperWidth": "4","allocation": True,"model": "RB3150","connType": ["Lan","Wifi","BlueTooth"],"commandSet": "TVSPOS"}
so this should remove from my final object.How to do this in python.
d = {"allPrinters": [{"models": [{"paperWidth": "4","allocation": True,"model": "RB3150","connType": ["Lan","Wifi","BlueTooth"],"commandSet": "TVSPOS"},{"paperWidth": "4","allocation": False,"model": "RB3151","connType": ["Lan","Wifi"],"commandSet": "TVSPOS"}],"active": True,"make": "TVS","_id": "59e6f670f532eb1260b50cd9"},{"models": [{"paperWidth": "4","allocation": False,"model": "EP3160","connType": ["Lan","Wifi"],"commandSet": "ESCPOS"},{"paperWidth": "4","allocation": True,"model": "EP3161","connType": ["Lan"],"commandSet": "ESCPOS"}],"active": True,"make": "EPSON","_id": "59e6fc8ff532eb1260b50cf4"}]}
Thank You, Ramesh M