[js] better for-in parsing (not perfect yet)