I think JavaScript doesn't have anything like obj.first, but I was wondering if something like this can be achieved in any way:
var foobar = { aint: "foo", an: "bar", array: "foobar" };
var recursiveObjDump = function (obj, idx) {
if (idx == obj.last.index) return obj[idx];
else return obj[idx] + " " + recursiveObjDump(obj, obj[idx].next.index);
};
alert( recursiveObjDump(foobar, foobar.first.index) );
Thanks.