MYSQL Triggers: JSON_SEARCH an integer value in a json array of integers
<p>I am looking to use json_search to get the array path that corresponds to a value.   </p>

<p>I have tried and this works: </p>

<pre><code>SET @j = '["3", "2", "1"]';
SELECT json_search(@j, 'one', '2');
</code></pre>

<p>returns $[1];</p>

<p>I have tried and this doesn't work: (How do I make this work?)</p>

<pre><code>SET @j = '[3, 2, 1]';
SELECT json_search(@j, 'one', 2);
</code></pre>

<p>returns null;</p>

<p>Basically I want to store @j as an integer array instead of a string array for indexing purposes. Is there any way I can change the integer array into a string array for comparison if there is no way for json_search to work with integers? </p>