Guest User

Untitled

a guest
Nov 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import json
  2. string_data = '{"S.No":"9","data":[{"id":"ID1","value":" 0.34"},{"id":"ID2","value":" 2.92"},{"id":"ID3","value":" 2.92"}]}'
  3. data = json.loads(string_data)
  4. [float(d['value']) for d in data['data']]
  5. # will result in:
  6. [0.34, 2.92, 2.92]
Add Comment
Please, Sign In to add comment