Last active
November 5, 2016 17:10
-
-
Save anddam/49d2103f5c31647e7c676bc3b2b4aded to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Tries to solve https://gist.github.com/jhzab/38640e3df97eb4e25c9f360f87800f54 in a better way | |
example file at https://gist.github.com/jhzab/d5d4aeeb01ae4094035745a549b4ea14 | |
""" | |
import json | |
filename = 'example.json' | |
result = [] | |
with open(filename) as file: | |
for line in file: | |
for value in json.loads(line)['value']: | |
result.append((value['token'], value['label'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment