I have an API returning a response like this one.
data = [
{'id': 'x27fujsjfsfjsjf', 'price': '89992', 'type': 'ONE'}, {'id': 'ujufajfjfwau', 'price': '7777', 'type': 'ONE'}, {'id': 'x27adarasda', 'price': '88882', 'type': 'TWO'}
]
I would like to parse the response in pairs for example id and price. I use the python Websocket client to fetch data in real time.
Right now I use:
for d in data:
print (d['id])
But I can't find a solution to parse both the id,price and type together. Since I'm interested of price for a particular ID.