Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- string_data = '{"S.No":"9","data":[{"id":"ID1","value":" 0.34"},{"id":"ID2","value":" 2.92"},{"id":"ID3","value":" 2.92"}]}'
- data = json.loads(string_data)
- [float(d['value']) for d in data['data']]
- # will result in:
- [0.34, 2.92, 2.92]
Add Comment
Please, Sign In to add comment