I have the following python script
def main():
json_obj = {
"attributes": [
{
"key": "some key",
"value": "hello"
}
]
}
needle = "hello"
if needle in json_obj["attributes"]:
print("yay")
if __name__ == "__main__":
main()
Now i don't understand why the print statement returns false. surely needle is in the list.