I have a array of JSON in which i want to find whether a part of json is present or not.
For eg: I have this array of json:
a = [{'a':'xxxx','b':'yyyy'},{'a':'xzxzxz','b':'asqqqq'}]
And I want to know if a = 'xxxx' is present in the array or not?
I have tried this:
if {'a':'xxxx'} in a:
print('1')
else:
print('2')
But it is giving me '2'
How to do this. Thanks!
P.S: I don't want to use a FOR LOOP