js: recursive object enumerator