sqljsonregexp-substralibaba-clouddataworks

Regexp instruction in SQL


After applying function GET_JSON_OBJECT(features, '$.field') I get the values:

{10:3,300:286}
{300:86}
{300:3,50:1}

How to get the value after 300 then?

Needed result is

286
86
3

Solution

  • You can try this :

    GET_JSON_OBJECT(features, '$.field.300') 
    

    Or

     GET_JSON_OBJECT(features, '$.field."300"')