SQLite JSON_INSERT()

The SQLite json_insert() function allows us to insert a new value into a JSON document.

We pass the original JSON as the first argument when we call the function, followed by a path that specifies where to insert the new value, followed by the value to insert.

We can also insert multiple key/value pairs if required.

Read more

SQLite JSON_EXTRACT()

In SQLite, the json_extract() function extracts and returns one or more values from well-formed JSON.

We pass the JSON as an argument when we call the function, and it returns the applicable value/s.

We can specify one or more paths to extract from the JSON document.

Read more

SQLite JSON_ARRAY_LENGTH()

In SQLite, the json_array_length() function returns the number of elements in a given JSON array.

The array is provided as an argument. If the array is embedded within a larger JSON document, we can use an optional second argument to specify the path to the array.

If the value is not an array, the function returns 0.

Read more

SQLite JSON_ARRAY()

In SQLite, the json_array() function returns a well-formed JSON array based on its arguments.

The function accepts zero or more arguments, and each argument becomes an element in the resulting array.

Read more

SQLite JSON_OBJECT()

The SQLite json_object() function returns a well-formed JSON object based on its arguments.

The function accepts zero or more pairs of arguments and returns a well-formed JSON object based on those arguments.

Read more