No, no, at least not use reflection-style operations.
Objects do not know the names of the objects in which they are contained, not least because the same object (link) can be contained in many objects.
The only way you could do this is to start from the top object and go your way inward, for example:
function fillRoutes(obj) {
var route = obj._route || '';
for (var key in obj) {
if (key === '_route') continue;
var next = obj[key];
next._route = route + '/' + key;
fillRoutes(next);
}
}
_route , .
. http://jsfiddle.net/alnitak/WbMfW/