Creating app similar to freecodecamp.org/map, how does the search function work?

Hi Guys,

I am building app that would be essentially a list with dropdowns, just like freecodecamp.org/map, where should I start when building a search engine for such list?

Since the functionality is identical to the freecodecamp.org/mappage, would it be ethical if I were to somehow use GitHub code from that page for my personal project?

Thank you very much in advance!
Milos Nikolic