Junior — Senior
Search for listings by price range and keyword in the title
livecode
Task condition
Given an array of listings. Implement a function that filters elements where the price falls within a specified range and the title contains a given text query.
items = [
{"title": "3-room apartment, 80m², 13/22 floor", "rooms": 3, "price": 70000, "petFriendly": True},
{"title": "2-room apartment, 45m², 5/5 floor", "rooms": 2, "price": 60000, "petFriendly": False, "deposit": 60000},
{"title": "2-room apartment, 44m², 4/4 floor", "rooms": 2, "price": 45000, "petFriendly": True, "agency": True},
{"title": "2-room apartment, 44m², 4/4 floor", "rooms": 2, "price": 45000, "petFriendly": True, "agency": True, "fee": 45000},
# ...
]