DuckDB has a json_extract_string()
function that works similar to json_extract()
, except that it returns its result as a string (varchar
). The json_extract()
function, on the other hand, returns its result as JSON.
The purpose of these two functions is to extract data from a JSON document. We’ll focus on the json_extract_string()
function in this article.