Is there a some way, by 'way' I mean using rx operators, to transform each HashMap value (setting the hashmap key as a value field) and get into a new Hashmap or ArrList?
Observable<HashMap<String,Allergy>> observable = MyREST.getsAllergiesApi().getAllAllergiesRx();
observable
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.unsubscribeOn(Schedulers.io())
.subscribe(new Subscriber<HashMap<String, Allergy>>() {
@Override
public void onCompleted() {
Log.i(TAG,"onCompleted");
}
@Override
public void onError(Throwable e) {
Log.i(TAG,"onError");
}
@Override
public void onNext(HashMap<String, Allergy> allergies) {
mView.displayAllergies(allergies);
Log.i(TAG,"onNeXt");
}
});