Convert an object to array of size 1 in PostgreSQL jsonb and transform the json with nested arrays to rows
I have a two part question We have a PostgreSQL table with a jsonb column. The values in jsonb are valid jsons, but they are such that for some rows a node would come in as an array whereas for…