I have the following list of dictionary:
mydata = [ { "created_time": "2017-07-22T19:54:03+0000", "message": "AAAAAAA", "id": "1892434161030557_1945301442410495" }, { "created_time": "2017-07-16T12:55:37+0000", "message": "YYYYYYYYY", "id": "1892434161030557_1941921866081786" }, { "created_time": "2017-07-16T12:43:44+0000", "message": "PPPPPPPPPPPPP", "id": "1892434161030557_1941917586082214" }, { "created_time": "2017-05-12T05:42:58+0000", "message": "m", "id": "1892434161030557_1906744326266207" } ] When I print the created_time it works fine:
for x in mydata: print(x['created_time']) I get correct output for the created_time and id values. But when I try to read the message value, I get KeyError: 'message'.
xeven has a "message" key?