title: Backbone.js: How to get the index of a model in a Backbone Collection?
body: <p>Is there a way to find the index of a model within a collection?</p>
  
  <p>Let's say in a view we have a model we're working on, could that model spit out it's index within the collection it's currently inside of? I'd like to do this because I want to access the model above or below the current target.</p>
  
  <p>In other words is there something like:</p>
  
  <pre><code>index = this.model.index
  modelAbove = this.collection.at( index-1 )
  </code></pre>
  
  <p>My data is a nested set so I can just do a search on the "lft" or "rgt" columns, but I didn't want to reinvent the wheel if Backbone already has this info available.</p>