Standardizes the device IDs match an entry's name as they were mixed between using prefixes and names in the past.
Code that I ran (minus syntax errors and random prints I wanted to check):
In [1]: import json
In [4]: with open('db.json') as infile:
...: db = json.load(infile)
...:
In [6]: newdb = {}
In [10]: for key in db:
...: db[key]['_id'] = db[key]['name']
...:
In [11]: for key in db:
...: newdb[db[key]['name']] = db[key]
...:
In [15]: with open('db.json','w') as outfile:
...: json.dump(newdb, outfile)
Standardizes the device IDs match an entry's name as they were mixed between using prefixes and names in the past.
Code that I ran (minus syntax errors and random prints I wanted to check):