We are to search collection and find businesses in the county from countyToSearch. Save the name, full address, county and state to saveLocation1
How it is currently is not correct. I dont really understand the filter()
def FindBusinessBasedOnCounty(countyToSearch, saveLocation1, collection):
c = collection.filter(lambda user: user['county'] == countyToSearch)
f = open(saveLocation1, 'w')
for bus in c:
f.write(bus["Name"] + "$" + bus["FullAddress"] + "$" + bus["County"] + "$" + bus["State"] + "\n")
f.close()
edit: I want the result to be the rows in database, where the countyname is equal to countyToSearch.