title: Update Meteor Leaderboard with own data
body: <p>I've changed the meteor example leaderboard into a voting app. I have some documents with an array and in this array there are 6 values. The sum of this 6 values works fine, but not updating and showing the values in my app.</p>
  
  <p>The values are only updating, if I click on them. The problem is, that I get the booknames  (it's a voting app for books) from the "selected_books" variable (previously selected_players), but I don't know how I can get the book names.</p>
  
  <p>By the way: _id are the book names. 
  I will give you some code snippets and hope, somebody have a solution.</p>
  
  <p><strong>This is a document from my database:</strong></p>
  
  <pre><code>{
      _id: "A Dance With Dragons: Part 1",
      isbn: 9780007466061,
      flag: 20130901,
      score20130714: [1,2,3,4,5,0],
  }
  </code></pre>
  
  <p><strong>parts of my html file:</strong></p>
  
  <pre><code>&lt;template name="voting"&gt;
      ...
      &lt;div class="span5"&gt;
          {{#each books}}
              {{&gt; book}}
          {{/each}}
      &lt;/div&gt;
      ...
  &lt;/template&gt; 
  
  &lt;template name="book"&gt;
      &lt;div class="book {{selected}}"&gt;
          &lt;span class="name"&gt;{{_id}}&lt;/span&gt;
          &lt;span class="totalscore"&gt;{{totalscore}}&lt;/span&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p><strong>and parts of my Javascript file:</strong></p>
  
  <pre><code>Template.voting.books = function () {
      var total = 0;
      var book = Session.get("selected_book");
  
      Books.find({_id:book}).map(function(doc) {
          for (i=0; i&lt;6; i++) {
              total += parseInt(doc.score20130714[i], 10);
          }
      });
      Books.update({_id:book}, {$set: {totalscore: total}});
  
      return Books.find({flag: 20130901}, {sort: {totalscore: -1, _id: 1}});
  };
  </code></pre>
  
  <p>Thanks in advance</p>