Sort by JSON field values : <p>I have a table with json values like this:</p>

<p><strong>-Table 1</strong></p>

<pre><code>id    |   name   |   data
------+----------+---------------
1     | Test     | {"city_id": 3, "email":"test@test.com", "city_name":"something"}
2     | Test 2   | {"city_id": 1, "email":"test2@test2.com", "city_name":"another"}
3     | Test 3   | {"city_id": 6, "email":"test3@test3.com", "city_name":"blahblah"}
</code></pre>

<p>Now I want <code>SELECT</code> records with <code>order by</code> <code>data.city_name</code>, so I use this code:</p>

<pre><code>SELECT id, name, JSON_EXTRACT(data, 'city_name') AS cityName
FROM table1
ORDER BY cityName ASC
</code></pre>

<p>but this query cannot sort my records correctly !</p>

<p>P.S: <code>city_name</code> have UTF-8 characters.</p>
