i have the following json file, the "ticket" python variable contains the "data" part:
{
"date": "139096543"
"data": [
{
"author": {
"title": "User",
"champion": false,
"canonical_name": "tahlia_moffitt",
"id": 6944932
},
"is_spam": false,
"me_too_count": 2,
"status": "complete"
}
]
}
I used the following python script to get the data for example from "status":
'status': ticket.get('status') or 'NoStatus'
But i need the data from the author subclass. I tried as:
'title': ticket.get('author.title') or 'NoTitle'
and
'title': ticket.get('author[title]') or 'NoTitle'
too, but they didnt work for me. Can anybody propose a solution for me?
]. I hope this is not your real json file, as it seems improperly formatted.