I am using lambda function, python 3.6 and Mongodb atlas. In mongodb i have one collection below like this. collection name profile. below as the collection structure.
ch2 = [document["channel"] for document in ch]
new_list = []
for word in ch2[0]:
print(word)
if(re.findall(name, word)):
new_list.append(word)
return new_list