// Item is assigned to unnamed root object
// allow missing because so many objects are optional
rpgopts = 'doc=file case=any allowextra=yes allowmissing=yes countprefix=num_';
yajlopts = '{ "document_name": "item", "number_prefix": "YAJL_" }';
clear item;
monitor;
Data-Into item %data(response:rpgopts) %parser('YAJLINTO':yajlopts);
on-error;
endmon;
Don - the above is a bit more complicated than you may need... But I believe what you're looking for is to assign the "document_name".
HTH,
Greg
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Don Brown via MIDRANGE-L
Sent: Monday, November 28, 2022 5:22 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Cc: Don Brown <DBrown@xxxxxxxxxx>
Subject: [EXTERNAL] Data into with unnamed JSON
Hi All,
I know I have read the answer to this on this list but not finding it.
How do I name the data structure to retrieve a JSON without a name ?
current returned booking data:
[
{ "RequestedDate":"2022-11-10", ....... },
{ "RequestedDate":"2022-11-11", ....... },
{ ... }
]
So there is no name for the JSON how do I process that ?
Thank you
Don
--
This email has been scanned for computer viruses. Although MSD has taken reasonable precautions to ensure no viruses are present in this email, MSD cannot accept responsibility for any loss or damage arising from the use of this email or attachments..
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com [CAUTION! This email originated outside of the organization. Please do not open attachments or click links from an unknown or suspicious origin.]
As an Amazon Associate we earn from qualifying purchases.