I have a parameter to a program that contains a string of data containing a json array. I need to create a new json string using json_object() and within that json object, i need to insert the value of the parameter string (which again is a json array). It seems when I do it, the json string is encapsulated in quotes. How do I tell json_object to not put the value in quotes?
@request looks something like this:
I don't want @request to treated as a json string. Is there a way to run @request through json_arrayagg() to return an array object?
PHP Code:
select
json_object(
'request' value :@request
, 'response' value 'some response'
)
from sysibm.sysdummy1;
PHP Code:
[{'key':'value'},{'key':'value'}]
Comment