-
-
Save KyMidd/35fce493f37e3cded8a4e523979d52a4 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
| 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