dynamic flattening of nested pojo