Created
September 12, 2013 08:19
-
-
Save felipem775/6534374 to your computer and use it in GitHub Desktop.
Using a json file
This file contains 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
# Load a json file | |
json_data=open(jsonFilePath) | |
data = json.load(json_data) | |
json_data.close() | |
# Extract a string value and a array | |
key1 = data["key1"] | |
aArray = data["aArray"] | |
# Elements in a array | |
for element in aArray: | |
something(aArray["element"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment