Get the latest value of an Observable and emit it immeditely
<p>I'm trying to get the latest value of a given <code>Observable</code> and get it to emit
immediately once it's called. Given the code below as an example:</p>
<pre><code>return Observable.just(myObservable.last())
    .flatMap(myObservable1 -&gt; {
        return myObservable1;
    })
    .map(o -&gt; o.x) // Here I want to end up with a T object instead of Observable&lt;T&gt; object
</code></pre>
<p>This does not work because by doing this the <code>flatMap</code> will emit <code>myObservable1</code> which in turn will have
to emit to reach the <code>map</code>.
I don't know if doing such a thing is even possible. Does anyone have any clue on how to achieve this goal? Thank you</p>