I have a table for some 'settings' and in that table I have a record with a json array. It is a simple array, like this:
"['scenario1','scenario2','scenario3']"
I want to use a sub-select statement in a view to pull this information out so I can use it like this:
select * from table where field_scenario in (select ????? from settings_table where this=that)
I have been looking through documentation and googling for this but for the life of me I can't figure out how to 'pivot' the returning array into individual elements in order to use it.
Oracle 12c I believe, thanks in advance.
"['scenario1','scenario2','scenario3']"is not a JSON array; it is a JSON string.['scenario1','scenario2','scenario3'](without the surrounding quotes) would be a JSON array (and to strictly meet the syntax it should be double quotes but most parsers are permissive and allow both single- and double-quotes) .