json to entity, angular refactor