repl.it
@anonymous/

YellowishFrailPhases

Python 2.7

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import json
import request
dati = '{"devices": [{"remotecontrol_id": "r123456789","device_id": "d123456789","alias": "PC","groupid": "g12345678","online_state": "Online","supported_features": "remote_control chat","policy_id": "5d93f008-3b1f-8472-8555-3549d5a68092"},{"remotecontrol_id": "r123456780","device_id": "d345667567","alias": "Laptop","groupid": "g12345678","online_state": "Offline","supported_features": "remote_control"},{"remotecontrol_id": "r345678890","device_id": "d444443226","alias": "Office","groupid": "g12345678","online_state": "Offline","assigned_to": "True","last_seen": "2017-11-28T11:08:31Z"}]}'


all = json.loads(dati)

print all['devices'][0]['device_id']
print all['devices'][1]['device_id']
print all['devices'][2]['device_id']

#test