title: KnockoutJS group + sort by date
body: <p>I've got a set of Posts, like:</p>
  
  <pre><code>self.posts = ko.observableArray([
      {
          id : 1,
          is_stickey: false,
          date: '2014-09-01',
          content: 'demo content'
      },
      {
          id : 2,
          is_stickey: true,
          date: '2014-09-02',
          content: 'demo content'
      },
      // etcetera...
  ]
  </code></pre>
  
  <p>This set is augmented using infinite scrolling. In other words, additional items are pushed into it later.</p>
  
  <p>I'm trying to find an efficient (read: fast, without unnecessary iterations) way to do the following:</p>
  
  <ul>
  <li>Group Posts by date</li>
  <li>Sort posts by is_stickey (ascending) + date (descending)</li>
  <li>In case 'is_stickey' changes, the post should animate to its new position</li>
  </ul>
  
  <p>I'm thinking of using a Computed Observable to convert data into an Object as follows:</p>
  
  <pre><code>{
      'stickey' : [
          {
              id : 2,
              is_stickey: true,
              date: '2014-09-02',
              content: 'demo content'
          },
          {
              id : 3,
              is_stickey: true,
              date: '2014-08-26',
              content: 'demo content'
          }
      ],
      '2014-09-01' : [
          {
              id : 1,
              is_stickey: false,
              date: '2014-09-01',
              content: 'demo content'
          },
          {
              id : 4,
              is_stickey: false,
              date: '2014-09-01',
              content: 'demo content'
          }
      ],
      '2014-08-14' : [
          {
              id : 5,
              is_stickey: false,
              date: '2014-08-14',
              content: 'demo content'
          },
          {
              id : 6,
              is_stickey: false,
              date: '2014-08-14,
              content: 'demo content'
          }
      ]
  }
  </code></pre>
  
  <p>Unfortunately I'm a bit stuck in solving this:</p>
  
  <ol>
  <li>Will KnockoutJS be able to iterate over this object?</li>
  <li>Can it sort the Object keys like this?</li>
  <li>Can I hook into the beforeMove/afterMove to make it animate when 'is_stickey' changes?</li>
  <li>And most importantly; is this the right way to do it at all? Efficiency and speed is of great importance to me.</li>
  </ol>
  
  <p><em>Update</em></p>
  
  <p>The following result (View) is what I have in mind:</p>
  
  <pre><code>*sticky*
    Id 2 demo content
    Id 3 demo content
  *2014-09-01*
    Id 1 demo content
    Id 4 demo content
  *2014-08-14*
    Id 5 demo content
    Id 6 demo content
  </code></pre>