js: simplification of object properties enumeratio