raw:

{"wData_length":14,"SeasOceans":["Adriatic Sea","Arctic Ocean","Atlantic Ocean","Bay of Bengal","Caribbean Sea", ...]

formatted:

wData_length 14
SeasOceans
0 "Adriatic Sea"
1 "Arctic Ocean"
2 "Atlantic Ocean"
3 "Bay of Bengal"
4 "Caribbean Sea"


The array is 100 elements, of which only 14 have data.


On 11/14/2019 7:46 AM, Jon Paris wrote:
What does the JSON look like Booth? Kinda hard to map without knowing what it looks like.



On Nov 13, 2019, at 10:37 PM, Booth Martin <booth@xxxxxxxxxxxx> wrote:

I am consuming json data with a numeric field and with a 100-element array. I get the numeric field OK but the array fails. It looks like I need to use "nested" but every way I have tried to use it fails.

exec sql select "SeasOceans" into :wSeas
from json_table(systools.httpgetclob(:wURL, ''), '$'
columns(
nested '$.Oceans[*]'
columns("SeasOceans" varchar(20) ) ) error on error );


I am using an SQLRPGLE program for this and asked about this last week on the RPG list with no response.

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.