title: JSON best practices: filtering nodes client side or not?
body: <p>In my database I store a number of "topics" and "examples". Each example belongs to one topic.</p>
  
  <p>I'd like show all the topics by name ASC in a tree component <b>except for one topic (Topic C)</b> which I always want on top. This may though come to change later and I'd rather not change the basic JSON output of topics and examples from the DB.</p>
  
  <p>1) Does it seem reasonable to generate the "unordered list" structure client side (or should I, already in the json_encode() phase make sure the order is appropriate?) and</p>
  
  <p>2) how would I, in that case, filter one specific topic node by name and put it first in the sequence?</p>
  
  <ul>
  <li>Topic C
  <ul>
  <li>Example</li>
  <li>Example</li>
  </ul>
  </li>
  <li>Topic A
  <ul>
  <li>Example</li>
  <li>Example</li>
  </ul>
  </li>
  <li>Topic B
  <ul>
  <li>Example</li>
  <li>Example</li>
  </ul>
  </li>
  </ul>