python - Why json.keys() get keys in different order -
this question has answer here:
hi have following code in python:
import json jsonpost = json.loads('{"player": {"_id": "3","firstname":"kim","surname":"jones"},"newtable": {"_id": "4","surname": "abcd"}}') key in jsonpost.keys(): innerkey in jsonpost[key]: print innerkey
my question why when print out inner key order of keys jsonpost['player'] following:
_id , surname, firstname
python dictionaries implemented internally hash table. means key order not preserved. issue?
Comments
Post a Comment