PL/SQL (MOSC)

MOSC Banner

how to return a bracketed set of array elements from a multidimensional array object

edited Aug 31, 2021 3:13PM in PL/SQL (MOSC) Question

This question is spatial related. We are being supplied 4 dimension geojson and need to convert to three dimension. (At its root, it is just json) An example of the source is:

    "geometry" : {

       "type" : "LineString",

       "coordinates" : [

         [

           -105.61097554099996,

           41.323028470000054,

           0,

           100.66398196211685

         ],

         [

           -105.61098768999994,

           41.324348945000054,

           0,

           100.75508196211649

         ]]

we want to extract element [*][0,1,3] from the multidimensional array, but leave brackets around each element. This instuction "coords clob format json with array wrapper path '$.geometry.coordinates[*][0,1,3]'", within a json_table removes the interior backets and just brackets the external limits of the retrieved ordinates. Is their a way to keep the brackets around the retrieved sets so that the return coordinates look like this:

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center