Skip to content

Instantly share code, notes, and snippets.

@Quader
Created September 7, 2014 23:03
Show Gist options
  • Save Quader/35178ddb4a750d7a490d to your computer and use it in GitHub Desktop.
Save Quader/35178ddb4a750d7a490d to your computer and use it in GitHub Desktop.
osLoadAPI("json")
file = fs.open("playerDB.txt", "r")
fileStr = file.readAll()
file.close()
jsonObj = json.decode(fileStr)
for key, value in pairs(jsonObj) do
if key == "player" then
local playerObj = value
for key,value in pairs(playerObj) do
for key, value in pairs(value) do
print(value)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment