Added logic to request a navigation menu as json

I'm pretty new to coding for Contao, so if this should be done differently let me know and I''ll adopt it.