Your event['body'] is probably just a json string, not actual json, from what I remember.

Thus, instead of

item = event['body']

you can use

item = json.loads(event['body'])

which should parse json string into json object.


Based on the posted form of the event, you should use ast, not json

import ast

item = ast.literal_eval(event['body'])

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top