Traverse circular javascript object graphs