Passing data thru RxJs operators
<p>while learning some RxJs I came about this problem. I start my operator chain with an object and use ooe of it's properties to do an AJAX request using flatmap but I need the other object's properties passed along with the Ajax result. I came with the following solution, but I'm sure there must be a way more elegant or efficient solution to it. Any Idea on how to improve the code?  </p>

<pre><code>function fbInfo(ezfb){
const fbItems$ = Rx.Observable.from(lista)
    .map(item =&gt; Object.assign( {}, item, {query: `/${item.page}/feed?limit=1`}))
    .do(x=&gt;console.log(x))
    .flatMap(item =&gt; {
        return  Rx.Observable.fromPromise(ezfb.getLoginStatus().then((res)=&gt;{return ezfb.api(item.query)}))
                .withLatestFrom(Rx.Observable.from([item]),(res, it)=&gt; Object.assign({}, res, it))
    }).map(item =&gt; { return {            
        mensaje: item.data[0].message,
        id: item.data[0].id,
        created: item.data[0].created_time,
        nombre: item.nombre
        }
    })
return fbItems$
}
</code></pre>

<p>Thanks in advance :)</p>