title: How to convert LiveData<List<Foo>> into LiveData<List<Bar>>?
body: <p>Let's say we have two objects of LiveData:</p>
  
  <pre><code>LiveData&lt;List&lt;Foo&gt;&gt; fooList;
  LiveData&lt;List&lt;Bar&gt;&gt; barList;
  </code></pre>
  
  <p>And by some method (or the constructor) Foo can be converted to the Bar object.
  What is the best way to convert the first observable, which has the list of Foo objects to the observable with the list of Bar objects.</p>
  
  <p>I know that it is possible to do this:</p>
  
  <pre><code>barList = Transformations.map(fooList, fooList1 -&gt; {
          List&lt;Bar&gt; barList = new ArrayList&lt;&gt;();
          for (Foo foo: fooList1) {
              barList.add(new Bar(foo)); 
          }
          return barList;
      });
  </code></pre>
  
  <p>But isn't there a better way similar to the flatMap operator in RxJava, by which we make all of the necessary conversions with the items from the list on the fly instead of dealing with the lists themselves as in the example above?</p>