This just be so obvious but I it seems not. Below I stripped out some of the code for clarity
var list = context.get_web().get_lists().getByTitle('SMenuLink')
//usual code to open a list using CSOM
context.load(allItems,"Include(Title,SubMenuItemId,SubMenuItemText)
//a array to hold our JSon stringifer objects
var subMenuItems = [];
// loop through the list
{
var subMenuItem = JSON.stringify(listItem.get_fieldValues());
// create a Json Object with sringifier
subMenuItems.push(subMenuItem)
}
Now I want to reference the one of the array items and pick the field value
var daniel = subMenuItems[0].SubMenuItemText;
alert(daniel);
I can see that array item [0] looks perfect in firebug but I not for the first time in my life am still "undefined"!!!! Therefore, my syntax is obviously wrong.....
