web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

read out JSON node in Dynamics 365 Finance and Operations

(0) ShareShare
ReportReport
Posted on by 25
{
    "message": "SUCCESS",
    "status": 10001,
    "data": {
        "hostapplicationlocaldata_id": 118942,
        "transactiontype_id": 518,
        "hostapplicationkeyvalues": [
            {
                "key": "Invoice Number",
                "value": "Inv_1001"
            },
            {
                "key": "Invoice Description",
                "value": "Inv_desc_1001"
            },
            {
                "key": "Invoice Account",
                "value": "1001"
            },
            {
                "key": "Invoice Date",
                "value": "2020-09-16"
            }
        ],
        "canbeassociated": false,
        "showadddocumentpromptonsave": null,
        "showsidebysideentryprompt": null
    },
    "end_point": null,
    "timestamp": "637365283511395216",
    "error": []
}
While I'm consuming URL of 3rd Party, got response in JSON Node, need to use KEY and Value node value.
 
I have the same question (0)
  • Verified answer
    vinitgoyal2005 Profile Picture
    6,332 on at

    Hi,

    Check community.dynamics.com/.../621319

    and  ariste.info/.../

  • Suggested answer
    Sukrut Parab Profile Picture
    71,735 Moderator on at

    You can create a contract class  and utilize FormJsonSerializer::deserializeCollection method to get the values, you can refer example here or you can use RetailCommonWebAPI class to get values in a map as you have key and value and then read  values from map . You can use find references to look at the examples in standard code.

    Stream responsestr = httpWwebresponse.GetResponseStream();
                StreamReader reader = new System.IO.StreamReader(responsestr);
                map = RetailCommonWebAPI::getMapFromJsonString(reader.ReadToEnd());

  • Yash Doshi Profile Picture
    25 on at

    streamRead                  = new System.IO.StreamReader(dataStream);

    returnValue                  = streamRead.ReadToEnd();

    map                              = RetailCommonWebAPI::getMapFromJsonString(returnValue);

    mapEnumerator           = map.getEnumerator();

    while(mapEnumerator.moveNext())

    {

       switch (mapEnumerator.currentKey())

       {

           case "data":

               container1                  = mapEnumerator.currentValue();

               map1                        = Map::create(container1);

               hostApplicatioLocalDataId   = map1.lookup('hostapplicationlocaldata_id');

               //hostApplicationKeyValue     = map1.lookup('hostapplicationkeyvalues');

               //info(map2.lookup('hostapplicationlocaldata_id'));

       }

    }

    As I used map, I got the value of hostapplicationlocaldata_id which is in under the node of "data", Now I want to get HostApplicationKeyValue node's value which is a array.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 694

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 646 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 337

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans