How to convert a JSON array into a set of rows in Oracle?
NickName:xuange Ask DateTime:2020-04-27T13:36:21

How to convert a JSON array into a set of rows in Oracle?

I want to convert a json array into a set of rows in Oracle.

Input:

'["a","b","c"]'

Output:

col_name
---------
a
b
c

PostgreSQL provides the function, jsonb_array_elements(jsonb) to do this.

How can I do this in Oracle 18c. Thank you.

Copyright Notice:Content Author:「xuange」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/61452345/how-to-convert-a-json-array-into-a-set-of-rows-in-oracle

More about “How to convert a JSON array into a set of rows in Oracle?” related questions

How to convert a JSON array into a set of rows in Oracle?

I want to convert a json array into a set of rows in Oracle. Input: '["a","b","c"]' Output: col_name --------- a b c PostgreSQL provides the function, jso

Show Detail

How to convert JSON string to JSON in Oracle

I need to convert JSON string to JSON in Oracle query. Example String: {\"1\":{\"qid\":1,\"aid\":1,\"a\":\"Yes\",\"isdyn\":0},\"2\":{\"qid\":2,\"aid\&qu

Show Detail

How to convert Oracle data to JSON and then use in JavaScript?

Environment is: Oracle APEX v4.2.2 / DB is Oracle 11gR2 / Browser is: IE11 I'm currently working on an application using Oracle APEX v4.2.2 where I need to take data within a table, convert it to ...

Show Detail

Convert BigQuery rows to array of JSON

I wan to convert all the rows of BigQuery query output to an array of JSON. For example: I want to convert the following output rows Col1 Col2 ex1a ex1b ex2a ex2b Convert this to the following ...

Show Detail

Oracle: Convert XML to JSON

I am writing one stored procedure where by using db link I am copying data of one table and inserting it into my another db. But before inserting I need to convert one clob field which is in xml t...

Show Detail

Convert an SQL Query as JSON in Oracle 11g within Oracle APEX

Within Oracle APEX v4.2 I have a fairly large table with around 40 columns and up to 50 rows where I need to fetch using SQL and convert each row to a JSON object. I am using Oracle 11gR2 and need...

Show Detail

sails:how to convert array of array to json object

I'm trying to read my uploaded xlsx find and trying to convert array of array to json key value pair object. so i'm trying below snippet var fs = uploadedFiles[0].fd; var xlsxRows = require('xlsx-...

Show Detail

Convert JSON array in MySQL to rows

UPDATE: This is now possible in MySQL 8 via the JSON_TABLE function: https://dev.mysql.com/doc/refman/8.0/en/json-table-functions.html I'm loving the new JSON functions in MySQL 5.7, but running i...

Show Detail

Convert JSON array in MySQL to rows

UPDATE: This is now possible in MySQL 8 via the JSON_TABLE function: https://dev.mysql.com/doc/refman/8.0/en/json-table-functions.html I'm loving the new JSON functions in MySQL 5.7, but running i...

Show Detail

How to convert pgx.Rows from Query() to json array?

I'm using github.com/jackc/pgx for work with postgreSQL. Noq I want to convert pgx.Rows from Query() to json array. I tried func for *sql.Rows, but it doesn't work for *pgx.Rows func PgSqlRowsToJson(

Show Detail