This gist is for showing an example of a custom wordpress menu.
If you want to get more from the menu item simply have a look at the $item object. i.e:
// Will return a large object with lots of props like title, url, description, id etc.
var_dump( $item );
This code works on Wordpress 4.1.1 as of 31st of March 2015
The problem is in the
( $parent_id == $item->menu_item_parent )
statements.While looping a third level menu-item, the parent_id is the ID of the parent item (so second level), while the $parent_id is the top-parent ID.
We've solved this to change $parent_id to an array which contains all of the previous menu-item ID's.
After that, improve the statements with the
in_array($item->menu_item_parent, $parent_id)
function.