python code to parse nested json file