Build a boostrap nav from a javascript definition