visit all the children of a javascript object