I would like to translate the following query with SQLAlchemy but I don't find anything on this topic in the doc.
SELECT * FROM table_persons, jsonb_array_elements(data->'persons') WITH ORDINALITY as persons (data, n);
Where the data column has JSONB type.