8 lines
258 B
Python
8 lines
258 B
Python
|
import json
|
||
|
|
||
|
with open("raw.json", "r") as f:
|
||
|
string = f.read()
|
||
|
rawls = json.loads(string)
|
||
|
latlons = [{'lat': x['lat'], 'lon': x['lon']} for x in rawls if x['lon'] != None]
|
||
|
with open("pos.json", "w") as w:
|
||
|
w.write(json.dumps(latlons))
|