import json

with open('pe_10_1.json', 'r') as file:
	data = json.load(file)
	payload = data["payload"]

print("Dit zijn de namen, codes en types van elk station:")
for i in payload:
	print(
		"{:<24} {:<6} {:<24}"
		.format(
			i["namen"]["lang"],
			i["code"],
			i["stationType"]
		)
	)

base = 0
for i in payload:
	if i["lng"] > base:
		base = i["lng"]
		p = payload.index(i)

print("Het meet oostelijk gelegen station is " + payload[p]["namen"]["lang"])