Having declared your array nav you can access its elements with nav[index] but you can't add a second dimension to item 0 just by saying nav[0][0] - you need to declare nav[0] as an array before using it:
nav[0] = [];
nav[0][0] = ...
But you can declare it all in one statement with an array literal, where for your purpose I'd suggest an array of objects:
var nav = [
{ "title" : "Item A",
"submenu" : [ "Item A1", "Item A2" ] },
{ "title" : "Item B",
"submenu" : [ "Item B1", "Item B2", "Item B3"] }
];
If your desired output was this:
<ul>
<li>Item A
<ul>
<li>Item A1</li>
<li>Item A2</li>
</ul>
</li>
<li>Item B
<ul>
<li>Item B1</li>
<li>Item B2</li>
<li>Item B3</li>
</ul>
</li>
</ul>
You could do it like so:
var $menu = $("<ul></ul>");
$.each(nav, function(i, val) {
var $item = $("<li></li>").html(val.title),
$sub = $("<ul></ul>");
$.each(val.submenu, function(j, sub) {
$sub.append($("<li></li>").html(sub));
});
$menu.append($item.append($sub));
});
$("body").append($menu);
Demo: http://jsfiddle.net/9kRs3/
Of course you could build the menu up as a string like in your original code, but I've chosen to create the elements as I go.
Using the object structure above you can easily add some extra properties to define what happens when each item is clicked. And you could make each item in the submenu arrays have the same object structure as the top level so that you can nest more and more levels as needed.