I don't know if we found the solution.
I found with MariaDB a way, to search path in a array. For example, in array [{"id":1}, {"id":2}], I want find path with id equal to 2.
SELECT JSON_SEARCH('name_field', 'one', 2, null, '$[*].id')
FROM name_table
create function searchGT(threshold int, d JSON)
returns int
begin
set @i = 0;
while @i < json_length(d) do
if json_extract(d, CONCAT('$[', @i, ']')) > threshold then
return json_extract(d, CONCAT('$[', @i, ']'));
end if;
set @i = @i + 1;
end while;
return null;
end;
select searchGT(3, CAST('[1,10,20]' AS JSON));