1 2 3 4 5 6 7 8 9 10 11 12 13
import json import sys compiled = [] jfile = json.load(open(sys.argv[1])) for beer in jfile: style = ' - '.join(beer['style']) compiled.append(style) compiled = sorted(list(set(compiled))) print(json.dumps(compiled))