I believe I am concating to my jsonb array wrong. ...
# help
j
I believe I am concating to my jsonb array wrong. if I have declare like
mylist jsonb := '[]';
and in loop want to push opjects into it
Copy code
mylist = mylist || jsonb_build_object(
      'id', my_id::uuid,
      'myfield', some_text,
    );
I think this is actually making the list like jsonb[] type without string around '[]' its like []. Error is
operator does not exist: character varying = jsonb
for overall func and I think something like this is issue
n
Hello @jar! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
j
or maybe i should use jsonb[] type idk
idk what i ended up doing maybe changed from jsonb_extract_path to myjson->>'something' type syntax idk what the issue was or what was the thing that fixed but ill just close this
n
Thread was archived by @jar. Anyone can send a message to unarchive it.