GetJsonArray( INPUT property-name AS CHARACTER )
|
{
"CustOrder": { "CustNum": 1, "Name": "Lift Tours", "NewCust": false, "ttOrder": [ {"OrderNum": 82, "OrderDate": "2010-09-20"}, {"OrderNum": 83, "OrderDate": "2010-09-20"} ] } } |
DEFINE VARIABLE CustInfo AS LONGCHAR NO-UNDO.
DEFINE VARIABLE myObj AS JsonObject NO-UNDO. DEFINE VARIABLE myArray AS JsonArray NO-UNDO. DEFINE VARIABLE myLongchar as LONGCHAR NO-UNDO. /* . . Set CustInfo to JsonObject shown above. . */ myObj = CAST(myParser:Parse(CustInfo), JsonObject). myArray = myObj:GetJsonObject("CustOrder"):GetJsonArray("ttOrder"). myArray:Write(myLongchar, TRUE). |
[
{"OrderNum": 82, "OrderDate": "2010-09-20"}, {"OrderNum": 83, "OrderDate": "2010-09-20"} ] |