Hi, I have a MongoDB collection that looks like this. I am using Python to build a query
Name: John-smith
address:
xyz street
more documents
I want to get down to the document below xyz without hard coding xyz or using the address level.
currently I am doing it like that colToKeep = [‘Name’,] + [x for x in BOFO.columns if ‘address’ in x] the result is everything under address which is huge. what is a better way in Python?