I need to perform filter using custom logic. I have defined a function as follows:
def isValid(str):
if str=='test':
true
else:
false
and calling it from a filter lambda as follows:
data.filter(lambda obj: isValid(obj['str'])
This doesn't work. What am I missing?