MariaDB JSON_ARRAYAGG() Explained

In MariaDB, JSON_ARRAYAGG() is a built-in function that returns a JSON array containing an element for each value in a given set of JSON or SQL values.

The function acts on a column or an expression that evaluates to a single value. It enables you to aggregate a result set as a single JSON array. Each row of the result set ends up as a single element in the array.

Read more

MongoDB $isArray

In MongoDB you can use the $isArray aggregation pipeline operator to check whether or not a value is an array.

It accepts any valid expression, and returns true if the expression is an array, false if it’s not.

Read more