Consider two distinct REST services in my project:
todo.service.ts
user.service.ts
Below are the properties defining each object:
todo: userId, title, id, completed
user: id, name, email, etc
Both services return an Observable with collections conforming to these definitions.
users: Observable<User[]>
todos: Observable<Todo[]>
The desired output format looks like this:
todo.title by user.name
What would be the most optimal approach to achieve this? Should I merge them into one combined object like so:
todo: id, title, completed, user { id, name, email, etc }
Alternatively, is there a better strategy to accomplish this?
Any insights or suggestions would be greatly appreciated. Thank you!