how to sort card in symfony : <p>i am beginner in <code>symfony</code> and I want to sort (with <code>SYMFONY</code> 3) a hand of 10 <code>cards</code> (given randomly to the user) according to this order :
Category order : DIAMOND – HEART – SPADES – CLUB.
Value order : AS – 2 – 3 – 4 – 5 – 6 – 7 – 8 – 9 – 10 – JACK – QUEEN – KING .
For exemple : i recover the user’s 10 random cards through a JSON file : </p>

<pre><code>{ 
   "cards":[ 
      { 
         "category":"DIAMOND",
         "value":"TEN"
      },
      { 
         "category":"CLUB",
         "value":"ACE"
      },
      { 
         "category":"DIAMOND",
         "value":"QUEEN"
      },
      { 
         "category":"SPADES",
         "value":"SEVEN"
      },
      { 
         "category":"DIAMOND",
         "value":"NINE"
      },
      { 
         "category":"HEART",
         "value":"QUEEN"
      },
      { 
         "category":"CLUB",
         "value":"TEN"
      },
      { 
         "category":"HEART",
         "value":"FIVE"
      },
      { 
         "category":"HEART",
         "value":"SEVEN"
      }
   ]
}
</code></pre>

<p>The sorted cards become : ACE CLUB /FIVE HEART / SIX  CLUB/ SEVEN HEART / SEVEN SPADES / NINE DIAMOND / TEN DIAMOND /TEN CLUB/ QUEEN  DIAMOND/ QUEEN HEART
I Don’t know how to start ?</p>
