Replies: 1 comment
-
|
I don't have the way to do what you want, but you are treating the column like a json column in your code. You could have a json array inside of a json column maybe to do that. But you have an array column that each element is json. The code you are running (jsonb_array_elements) is looking for a json array not an array of json. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Greeting!
I want a function that asks the id[takes parmater as tune_id] to match the value of the "id" key in any object in array and update its "downloaded" key's value from false to true. it updates only the downloaded value to true for the object with the specified id. in this case the id can be either 1234289 or 1593852. value of "id" key is type integer.
Data looks like this in my table editor of studios column in my users' table defied as jsonb[] Array
The Function im using is below:
The Error:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions