How do I convert delimited strings into a hierarchical JSON in python. I saw a solution for a similar question in jQuery. I have been trying to find a python solution for the same.
Convert delimited string into hierarchical JSON with JQuery
The goal is to generate a hierarchical json of categories from a bunch of URLs which might look like below
sport/tennis/grandslams
sport/chess
sport/chess/players/men
sport/tennis
sport/cricket/stadiums
sport/tennis/players