title: AngularJS convert JSON string to JSON object in filter
body: <p>I am working on a defect where I am getting numeric data as a JSON Object but in view its auto converting to string. As a result I am unable to sort it.</p>
  
  <p>For example,</p>
  
  <pre><code>data = [
  {
    num : "1"
  },
  
  {
    num : "2"
  },
  {
    num : "3"
  },
  
  {
    num : "10"
  },
  {
    num : "12"
  },
  
  {
    num : "22"
  }
  ]
  </code></pre>
  
  <p>So when I sort this with orderBy:num, its giving me below output</p>
  
  <p>1
  10
  12
  2
  22
  3</p>
  
  <p>Because of Angular convert it as a string but I want in proper format. Please help!!</p>