-
-
Save KyMidd/af39d685cf3e592bd50f8fafd778119d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Isolate the event body from the event package | |
| def isolate_event_body(event): | |
| # Dump the event to a string, then load it as a dict | |
| event_string = json.dumps(event, indent=2) | |
| event_dict = json.loads(event_string) | |
| # Isolate the event body from event package | |
| event_body = event_dict['body'] | |
| body = json.loads(event_body) | |
| # Return the event | |
| return body |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment