I have a json array stored in my postgres database. The json look like this:
[
{
\"operation\": \"U\",
\"taxCode\": \"100
I post the answer originally written by pozs in the comment section.
unnest() is for PostgreSQL's array types.
Instead one of the following function can be used:
json_array_elements(json) (9.3+)jsonb_array_elements(jsonb) (9.4+)json[b]_array_elements_text(json[b]) (9.4+)Example:
select * from json_array_elements('[1,true, [2,false]]')
output value
-------------
| 1 |
-------------
| true |
-------------
| [2,false] |
-------------
Here where the documentation for v9.4 can be found.