|
The documentation I was reading at https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/sqlp/rbafyjsontable.htm
did not have an explanation of the "path". Reading further, I found where it had example of an array within the json object. That got me to
SELECT * FROM json_table('
{
"wData_length":14,
"SeasOceans":[
"Adriatic Sea",
"Arctic Ocean",
"Atlantic Ocean",
"Bay of Bengal",
"Caribbean Sea"
]
}',
'lax $.SeasOceans[*]'
COLUMNS(
SeasOceans varchar(40) PATH 'lax $')
) as jt
which returns
....+....1....+....2....+....3....+....4
SEASOCEANS
Adriatic Sea
Arctic Ocean
Atlantic Ocean
Bay of Bengal
Caribbean Sea
******** End of data ********
I still have no idea what the lax in the path means. I tried changing it to abc and it didn't complain, but it didn't select anything either.
--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx> /
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.