Versions Compared

Key

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

...

Code Block
titleJSON Data
{
    "base": "SGD",
    "date": "2015-12-21",
    "rates": {
        "AUD": 0.99092,
        "BGN": 1.2777,
        "BRL": 2.8235
    }
}


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 วงเล็บปีกกาแสดงถึงวัตถุ วงเล็บเหลี่ยมหมายถึงอาร์เรย์

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



If your JSON URL returns the following,

Thai

หาก URL JSON ของคุณส่งคืนสิ่งต่อไปนี้

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 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" ซึ่งมันจะวนซ้ำผ่านอาร์เรย์และสร้างหลายระเบียน


Unfortunately, this is not how the JSON is returning the data (not scalable). You must adapt to it since it is not possible for you to ask them to change how the data is returned. If there's a new currency added in, then you will need to re-configure the JSON plugin to add in another row for it.
Thai

น่าเสียดายที่นี่ไม่ใช่วิธีที่ JSON ส่งคืนข้อมูล (ไม่สามารถปรับขนาดได้) คุณต้องปรับตัวเข้ากับมันเพราะมันเป็นไปไม่ได้ที่คุณจะขอให้พวกเขาเปลี่ยนวิธีการส่งคืนข้อมูล หากมีการเพิ่มสกุลเงินใหม่คุณจะต้องกำหนดค่าปลั๊กอิน JSON อีกครั้งเพื่อเพิ่มในแถวอื่น

Related Documentation

Thai

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

...