You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Note

To follow this tutorial, please head to jsonCurrency.zip the attached .txt files and save them in the "ROOT" folder of your local Joget Installation. You can find the ROOT folder by navigating to your installation folder > apache-tomcat-8.5.72 > webapps > ROOT


Tutorial

By calling http://localhost:8080/jsonCurrency1.txt, the following will be returned.

JSON Data
{
  "base": "SGD",
  "date": "2022-09-14",
  "rates": {
    "USD": 0.711805
  },
  "success": true,
  "timestamp": 1663170544
}


In JSON, curly bracket denotes an object. Square bracket denotes an array.

Because there's no array that we can iterate through, therefore, this is the only way of configuring it. Only one record will be created for this case.



If your JSON URL (http://localhost:8080/jsonCurrency2.txt) returns the following,

JSON Data
{
    "base": "SGD",
    "date": "2015-12-21",
    "rates": [
        { "currency" : "AUD",
          "rate" : 0.99092
        },
        { "currency" : "BGN",
          "rate" : 1.2777
        },
        { "currency" : "BRL",
          "rate" : 2.8235
        }
    ]
}


Then you can configure as follow and make use of the "Base JSON Object Name for Multirow Data" where it will iterate through the array and create multiple records.


Related Documentation




  • No labels