How can I do where clause containing json in mysql?
<p>For example, I have a column named json in table A</p>

<p>Json column contains json data like this :</p>

<pre><code>record 1 : {"dept_code": "012", "unit_code": "22"}
record 2 : {"dept_code": "013", "unit_code": "23"}
etc
</code></pre>

<p>I want to take the data records with json column that contain dept_code = 012</p>

<pre><code>SELECT * FROM table_A WHERE json = ...(looking dept_code = 012)...
</code></pre>

<p>How can I do that?</p>

<p>Note :</p>

<p>I tried to find answers on the site stackoverflow, but I did not find it. So I make this question</p>