title: Why does json values get sorted alphabetically iOS?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7947234/jsonkit-sorting-issues">JSONkit sorting issues</a>  </p>
  </blockquote>
  
  
  
  <p>I have the following jSON</p>
  
  <pre><code>[
    {
      "Pending": 67,
      "Past Due": 63,
      "Invites": 0
    },
    {
      "Reading Approval": 4,
      "Schedule Approval": 16,
      "Session Assignment": 1
    },
    {
      "Reading Approval": 3,
      "Schedule Approval": 20,
      "Class Approval": 20,
      "Module Approval": 2,
      "Training Plan Review": 2,
      "Job Confirmation": 1
    }
  </code></pre>
  
  <p>]   </p>
  
  <p>When I assign the json string to a nsarray the values inside the dictionary gets sorted alphabetically. </p>
  
  <pre><code>NSArray *arr = [strResult JSONValue]; 
  </code></pre>
  
  <p>How can I keep the same order as the json string?</p>
  
  <pre><code>arr = 
  {
    Invites = 0;
    "Past Due" = 63;
    Pending = 67;
  },
  {
    "Reading Approval" = 4;
    "Schedule Approval" = 16;
    "Session Assignment" = 1;
  },
  {
    "Class Approval" = 20;
    "Job Confirmation" = 1;
    "Module Approval" = 2;
    "Reading Approval" = 3;
    "Schedule Approval" = 20;
    "Training Plan Review" = 2;
  }
  )
  </code></pre>
  
  <hr>
  
  <p>This is the table I want to display:</p>
  
  <pre><code>Group 1
    Pending    67
    Past Due   63
    Invites    0
  
  Group 2
    Reading Approval    4
    Schedule Approval   16
    Session Assignment  1
  
  Group 3
    Reading Approval      3
    Schedule Approval     20
    Class Approval        20
    Module Approval       2
    Training Plan Review  2
    Job Confirmation      1
  </code></pre>