title: How to get index / position of list in onnext from Observable.fromIterable Rxjava?
body: <p>I'm trying to loop a list but i'm not getting the index of current item.</p>
  
  <pre><code>Observable.fromIterable(yourList).observeOn(Schedulers.io())
              .observeOn(Schedulers.io()).subscribe(
                  { item -&gt; {        }},
                  {_ -&gt;{}},
                  {-&gt;{}}
  </code></pre>
  
  <p>Is there any way to get index just like</p>
  
  <pre><code>yourList.forEachIndexed{ index, item -&gt; }
  </code></pre>
  
  <p>I already know that </p>
  
  <pre><code>class Indexed {
  int index;
  String element;
  
  Indexed(int index, String element) {
      this.index = index;
      this.element = element;
      }
  }
  </code></pre>
  
  <p>this can be used as a solution. But i don't like this kind of approach. I want to know whether Rxjava itself has something for it.</p>