Skip to content

Instantly share code, notes, and snippets.

@mgiacomini
Created April 2, 2018 20:22
Show Gist options
  • Save mgiacomini/49a6f8d6eb3b4ea573243f80c72d32a1 to your computer and use it in GitHub Desktop.
Save mgiacomini/49a6f8d6eb3b4ea573243f80c72d32a1 to your computer and use it in GitHub Desktop.
walter horning map
data = json.load(open("medidas.json"))
def is_json(myjson):
try:
json_object = json.loads(myjson)
except ValueError:
return False
return json_object
def decode_json(json):
return list(map(lambda i: i['attribute'][3]['value'], json))
json = decode_json(data['data_set']['data_model'])
print (json)
data = json.load(open("medidas.json"))
def is_json(myjson):
try:
json_object = json.loads(myjson)
except ValueError:
return False
return json_object
def decode_json(json):
return json['data_set']['data_model'][0]['attribute'][3]['value']
json = decode_json(data)
print (json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment