title: sort Json data in php ? Different specific data?
body: <p>This is json data in webservice, I need to sort this kind of information by top to date sort 2017..bla - 2015..bla -2014, maybe sort value "4" or title 2015 blabla.... value in a PHP script, how can I do?</p>
  
  <pre><code>"2015-09-11 09:18:11.023151": {
      "1": "4422",
      "2": "asd",
      "3": "aaa",
      "4": "2015-09-11 09:18:11.023151"
      },
  "2014-10-29 13:33:14.325827": {
      "1": "5852",
      "2": "shfe",
      "3": "sds",
      "4": "2014-10-29 13:33:14.325827"
  },
  "2017-11-10 09:18:11.315102": {
      "1": "2323",
      "2": "sfd",
      "3": "sdf",
      "4": "2017-11-10 09:18:11.315102"
  }
  </code></pre>
  
  <p>i try :</p>
  
  <pre><code>$example= json_decode($result, true);
  
  
  usort($example, function($a, $b) {  
      return $a-&gt;{"4"} &gt; $b-&gt;{"4"} ? -1 : 1; }); 
  
  echo json_encode($example);
  </code></pre>
  
  <p>how we can do it ? </p>