Q:

get list of object, make an operation on them, then converting them to list of objects using rxjava

I have two Retrofit requests A and B, one of them is depend on the other, 
A
    public Observable<List<Image>> getImages(double count) {
        return mService.getImages(count);
    }

B
    public Observable<ImageDetails> getImageDetails(String imageID) {
        return mService.getImageDetails(imageID);
    }

the second request B takes an imageId parameter which I can get by image.getId()
all I need to achieve is this:

get list of images.
get each image details.
combine each Image and ImageDetails into third object TheImage
return Observable of list of object TheImage

how can I achieve something like this using Rxjava

A:

Here is your solution, if you have any questions, feel free to ask. 
    Observable<List<TheImage>> listObservable = getImages(20)
            .flatMapIterable(images -> images) // gets individual image
            .flatMap(image -> getImageDetails(image.getId()) // gets image details
                    .map(imageDetails -> new TheImage(image, imageDetails))) // creates new object TheImage
            .toList(); // collects it to list

You can make parallel calls to getImageDetails if you subscribe to inner observable in a flatMap like this:
            .flatMap(image -> getImageDetails(image.getId())
                    .map(imageDetails -> new TheImage(image, imageDetails))
                    .subscribeOn(Schedulers.io()), maxConcurrent)

