• How can I read this?

    From Marco Boschi@21:1/5 to All on Tue Apr 11 05:58:27 2023
    This is a documentation of REST API for sending sms
    When I have aResp containing the information that I need I assign:
    nTotal := aResp[ "total" ]
    nPage := aResp[ "pageNumber" ]

    The problem is for
    "smshistory": [
    {
    "order_id" ,
    "create_time" ,
    "schedule_time"
    "message_type" ,
    "message": ,
    "sender" : "MySender",
    "num_recipients" :
    },


    How can I extract information for every sms?

    "order_id" , "create_time" , "schedule_time" , "message_type" , "message" , "sender" , "num_recipients"
    In documentation I found this

    {
    "total": 1, "// The total number of results"
    "pageNumber": 1, "// The returned page number"
    "result": "OK", "// The status of the request"
    "pageSize": 10, "// The page size"
    "smshistory": [ "// The SMS history"
    {
    "order_id" : "XYZABCQWERTY", "// The order ID"
    "create_time" : "yyyyMMddHHmmss", "// When the order was created"
    "schedule_time" : "yyyyMMddHHmmss", "// When the sending is scheduled"
    "message_type" : "N", "// The message type",
    "message": "Text message",
    "sender" : "MySender", "// The sender's alias"
    "num_recipients" : 2 "// The number of recipients"
    },
    {
    ...
    }
    ]
    }

    I can't figure out how to access the two dimensional hash
    Many thanks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Tue Apr 11 15:57:13 2023
    Il 11/04/2023 14:58, Marco Boschi ha scritto:

    I can't figure out how to access the two dimensional hash

    Try this:

    aResp[ "smshistory", 1, "order_id" ]

    --
    Enrico Maria Giordano

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco Boschi@21:1/5 to All on Tue Apr 11 07:28:53 2023
    aResp[ "smshistory", 1, "order_id" ]
    VERY GOOD!
    Many Thanks EMG

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)