I have a json file looks like this..
{
   "movies":[
      {
         "title":"Movie 1",
         "year":"2014",
         "categories":"Action,Sci-Fi",
         "rate":"10",
         "tags":"720p,1080p,Direct",
         "image_link":"img/1.jpg",
         "imdb_link":"http://www.imdb.com"
      },
      .
      .
      .
I need to sort this data using some options like by year, rate, alphabetically ascending and descending.
Here is the code of fetching the data
$jsondata = file_get_contents('data/movies.json');
$movies = json_decode($jsondata, true);
 
     
    