iterate properties of plain javascript objects