I "decoded" a dictionary of dictionaries and came down to:
waycategory_values = data['features'][0]['properties']['extras']['waycategory']['summary']
which results in:
[{'value': 3.0, 'distance': 230472.2, 'amount': 96.03}, {'value': 0.0, 'distance': 8713.7, 'amount': 3.63}, {'value': 1.0, 'distance': 811.1, 'amount': 0.34}]
now I want to get the distance and add the corresponding values up, if the value = 1.0, 2.0 or 3.0 I tried getting the distance by doing the following:
for distance in waycategory_values[0:]['distance']:
if waycategory_values[0:]['value'] == 1.0 or 2.0 or 3.0:
print(distance)
well - that's obviously wrong.. but can't seem to figure out how to do it - if you could just give me a hint, that would be awesome!