List which have subitems and sometimes not

I dont know how much you care about the list structure but @Dimitar_Venkov’s post in this thread shows how to normalize a list so you can have .map work on only one level.