I have an array of menu items, each containing Name and URL like this:
var menuItems = [ { name : \"Store\", url : \"/store\"
It's not in jQuery, but maybe this could help. I developed this after seeking the web to do exactly what you want.
http://www.chapleau.info/article/ArrayofUrlsToASitemap.html