Skip to content
Advertisement

check if JSON response has an object

I’m trying to filter out if a JSON response has objects, and do something if it has.

My Problem is that even if it has objects, it won’t trigger the break.

Here is my code:

JavaScript

Advertisement

Answer

print(email.get_list_of_emails()) return None. This is why you never get the break. Try to remove the print

Try to change the code to something like the below (it will give you better visibility)

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement