Convert record from Function call (RPC) to JSON

Hello, I am using raw SQL to run a function that returns a record, but it is returning it to the TS domain as a string like this:
"(b38ed355-c2b0-4998-aff9-8c8dc429ffe5,My_Test_Key,valid,aead-det,22,\"\\\\x7067736f6469756d\",\"2025-01-19 02:09:04.392092+00\",,\"\")"
"(b38ed355-c2b0-4998-aff9-8c8dc429ffe5,My_Test_Key,valid,aead-det,22,\"\\\\x7067736f6469756d\",\"2025-01-19 02:09:04.392092+00\",,\"\")"
instead of a JSON object with those values in key/value pairs. How can Kysely parse this value and convert it to an object?
2 Replies
koskimas
koskimas21h ago
Return to_json(theRow) instead of the raw record In case you're using postgres
Unknown User
Unknown User20h ago
Message Not Public
Sign In & Join Server To View

Did you find this page helpful?