Hi all,
I need some help to parse a json than start with square brackets, something like this:
I have it in a clob columns, and I try to parse it with json_table:
If I remove the first square brackets it works, but how can I do the parse with the square brackets?
Many thanks.
Bye
I need some help to parse a json than start with square brackets, something like this:
Code:
[ { "LEI": { "$": "894800UN8CML2Q7Y4V11" }, "Entity": { "LegalName": { "$": "PAOLINO PAPERINO" }, "LegalAddress": { "@xml:lang": "", "FirstAddressLine": { "$": "VIA ROMA 16" }, "City": { "$": "TORINO" }, "Region": { "$": "IT-21" }, "Country": { "$": "IT" }, "PostalCode": { "$": "10100" } }, "HeadquartersAddress": { "@xml:lang": "", "FirstAddressLine": { "$": "VIA ROMA 16" }, "City": { "$": "TORINO" }, "Region": { "$": "IT-21" }, "Country": { "$": "IT" }, "PostalCode": { "$": "10100" } }, "RegistrationAuthority": { "RegistrationAuthorityID": { "$": "RA000407" }, "RegistrationAuthorityEntityID": { "$": "TO-1070547" } }, "LegalJurisdiction": { "$": "IT" }, "LegalForm": { "EntityLegalFormCode": { "$": "8888" }, "OtherLegalForm": { "$": "srl" } }, "EntityStatus": { "$": "ACTIVE" } }, "Registration": { "InitialRegistrationDate": { "$": "2018-06-19T09:24:09+02:00" }, "LastUpdateDate": { "$": "2019-06-20T02:30:09+02:00" }, "RegistrationStatus": { "$": "LAPSED" }, "NextRenewalDate": { "$": "2019-06-19T09:24:10+02:00" }, "ManagingLOU": { "$": "529900F6BNUR3RJ2WH29" }, "ValidationSources": { "$": "FULLY_CORROBORATED" }, "ValidationAuthority": { "ValidationAuthorityID": { "$": "RA000407" }, "ValidationAuthorityEntityID": { "$": "TO-1070547" } } } } ]
Code:
Select LEI, outputclob From Uhttpbch0f, Json_Table (OutPutClob format json, 'lax $' Columns (Scadenza Varchar(30) Path 'lax $.LEI."$"')) As Lei Where Rowid = 9826;
Many thanks.
Bye
Comment