title: Dealing with large chunks of data via REST (JSON) API
body: <p>i am writing a wrapper around an API which takes in a couple of inputs and supplies nested JSON data. </p>
  
  <p>Before showing it on UI, i have to order that data by a certain property "Price" which is a decimal  (from high to low).</p>
  
  <p>I am trying to understand </p>
  
  <ol>
  <li>What is the most performant way of dealing with this ordering. My UI consumes the same JSON object that comes from the API. </li>
  </ol>
  
  <p>So if i am to order the data from High "Price" to Low </p>
  
  <p>a. do i convert the API output to a strongly-typed list of "Item" objects, 
   b. perform an ordering on the "Price" property 
   c. then convert the list of "Items" back to JSON so that UI can use it. </p>
  
  <p>This just seems to be an overkill to retain this in-memory representation of JSON to perform ordering. </p>
  
  <ol start="2">
  <li>If i have a large set of data, how do i stop running out of memory. Again this ties into the answer/solution that will be used in Question 1. </li>
  </ol>
  
  <p>How do i approach this </p>
  
  <p>thanks for your help  </p>