I already tried the solution in the following question but it didn't help it only explains how to create OOB filters.
I'm using sitecore 10.1 SXA and I need a way to view hierarchical filter in a search page(am using SXA OOB search).
For Example: I have checklist location filter with below values
I want to display all countries and cities like the above photo.
Does anyone knows how to create for example custom search facet/custom tree filter to do so?