I have 2 Observables, which call 2 WS
- Get a list of cars (at this point, each car from this list doesn't have his owner)
- Get the owner of the car
So first I get the list of cars. Everything is ok. But I would to get the owner for each car and set it in the Car entity, like car.setOwner(owner)
and send the final list of cars, containing their owner.
Api.getCars()
.subscribe(new Action1<List<Car>>() {
@Override
public void call(List<Car> cars) {
// get the list of cars, but need to get their owner
});
Which is the best way to do this? (Moreover, without lambdas.)