title: Why does sqlite3 `json_extract` not work with the `LIKE` operator?
body: <p>I'm trying to use sqlite as a key-value-store for a small project. Since I need to filter the data by specific content of the json I'm using <code>json_extract</code> to extract individual properties from it. However, for some reason the <code>LIKE</code> operator doesn't work on the result. Searching around I found that on MySQL you need to use <code>json_unquote</code> to get the raw string but on SQLite the <a href="https://www.sqlite.org/json1.html#jarray" rel="nofollow noreferrer">documentation (section 4.4.)</a> states that this is not needed if only one value is extracted. The <code>=</code> works fine. I've put together a minimal working example:</p>
  <pre><code>SQLite version 3.38.0 2022-02-22 18:58:40
  Enter &quot;.help&quot; for usage hints.
  Connected to a transient in-memory database.
  Use &quot;.open FILENAME&quot; to reopen on a persistent database.
  sqlite&gt; CREATE TABLE test (key TEXT, value TEXT);
  sqlite&gt; INSERT INTO test VALUES('a','{&quot;foo&quot;:&quot;bar&quot;}');
  sqlite&gt; SELECT * FROM test;
  a|{&quot;foo&quot;:&quot;bar&quot;}
  sqlite&gt; SELECT * FROM test WHERE json_extract(`value`, '$.foo') LIKE 'ba*';
  sqlite&gt; SELECT value, json_extract(`value`, '$.foo') AS foo FROM test;
  {&quot;foo&quot;:&quot;bar&quot;}|bar
  sqlite&gt; SELECT * FROM test WHERE json_extract(`value`, '$.foo') = 'bar';
  a|{&quot;foo&quot;:&quot;bar&quot;}
  </code></pre>
  <p>Am I missing something or does the <code>LIKE</code> operator not support this sepcific use case?</p>
  <p>Thanks :)</p>