Expands the top-level JSON array of objects to a set of rows having the composite type of the base argument.
Signatures & examples
jsonb_populate_recordset ( base anyelement, from_json jsonb ) → setof anyelement
Expands the top-level JSON array of objects to a set of rows having the composite type of the base argument. Each element of the JSON array is processed as described above for json[b]_populate_record.
select * from json_populate_recordset(null::twoints, '[{"a":1,"b":2}, {"a":3,"b":4}]') → a | b
---+---
1 | 2
3 | 4