Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Note
titleNote

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

English

Tutorial

Thai

เกี่ยวกับการสอน


By calling http://localhost:8080/api.fixer.io/latest?base=SGDjsonCurrency1.txt, the following will be returned.

Thai

โดยการเรียก http://localhost:8080/api.fixer.io/latest?base=SGD ข้อมูลต่อไปนี้จะถูกส่งคืนjsonCurrency1.txt ข้อมูลต่อไปนี้จะถูกส่งคืน

Code Block
titleJSON Data
{
    "base": "SGD",
    "date": "20152022-1209-2114",
    "rates": {
        "AUDUSD": 0.99092,711805
     },
   "BGNsuccess": 1.2777true,
        "BRLtimestamp": 2.8235
    }
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.

Thai

ใน JSON วงเล็บปีกกาแสดงถึงวัตถุ วงเล็บเหลี่ยมหมายถึงอาร์เรย์

เนื่องจากไม่มีอาร์เรย์ที่เราสามารถวนซ้ำได้ดังนั้นนี่เป็นวิธีเดียวในการกำหนดค่า จะมีการสร้างบันทึกเพียงหนึ่งรายการสำหรับกรณีนี้


Image RemovedImage Added


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

Thai

หาก URL JSON (http://localhost:8080/jsonCurrency2.txt) ของคุณส่งคืนสิ่งต่อไปนี้

Code Block
titleJSON 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 follows and make use of the "Base JSON Object Name for Multirow Data" where it will iterate through the array and create multiple records.

Thai

จากนั้นคุณสามารถกำหนดค่าดังต่อไปนี้และใช้ประโยชน์จาก "ชื่อวัตถุ JSON ฐานสำหรับข้อมูล Multirow" ซึ่งมันจะวนซ้ำผ่านอาร์เรย์และสร้างหลายระเบียน


Image RemovedImage Added

Related Documentation and Files

Thai

เอกสารที่เกี่ยวข้อง

...