sorting json array by value in php
<p>I have an array of json as shown below and i want to sort it by size</p>

<pre><code>Array
(
    [0] =&gt; {"file_name":"Desert - Copy.jpg","content_type":"image\/jpeg","tmp_path":"\/var\/www\/mywebsite.com\/public_html\/www\/tmp\/0000000012","sha256":"010f60d2927a35d0235490136ef9f4953b7ee453073794bcaf153d20a64544ea","size":"845941"}
    [1] =&gt; {"file_name":"Hydrangeas - Copy.jpg","content_type":"image\/jpeg","tmp_path":"\/var\/www\/mywebsite.com\/public_html\/www\/tmp\/0000000013","sha256":"3b92fede080f9b0ec902afc58831191b5b8ccbaf6732352fd7a8b445d1e9f0bd","size":"595284"}
    [2] =&gt; {"file_name":"Tulips.jpg","content_type":"image\/jpeg","tmp_path":"\/var\/www\/mywebsite.com\/public_html\/www\/tmp\/0000000014","sha256":"b9352f2565260219db72fc1fc896113a26c85866b69c50d3970c4d9f5cce830a","size":"620888"}
)
</code></pre>

<p>Result expected:</p>

<pre><code>Array
(

    [0] =&gt; {"file_name":"Hydrangeas - Copy.jpg","content_type":"image\/jpeg","tmp_path":"\/var\/www\/mywebsite.com\/public_html\/www\/tmp\/0000000013","sha256":"3b92fede080f9b0ec902afc58831191b5b8ccbaf6732352fd7a8b445d1e9f0bd","size":"595284"}
    [1] =&gt; {"file_name":"Tulips.jpg","content_type":"image\/jpeg","tmp_path":"\/var\/www\/mywebsite.com\/public_html\/www\/tmp\/0000000014","sha256":"b9352f2565260219db72fc1fc896113a26c85866b69c50d3970c4d9f5cce830a","size":"620888"}
    [2] =&gt; {"file_name":"Desert - Copy.jpg","content_type":"image\/jpeg","tmp_path":"\/var\/www\/mywebsite.com\/public_html\/www\/tmp\/0000000012","sha256":"010f60d2927a35d0235490136ef9f4953b7ee453073794bcaf153d20a64544ea","size":"845941"}
)
</code></pre>

<p>How do i accomplish this in an efficient manner</p>