Views:

Description

Loads an xCache collection from a JSON document.

Signature

xCacheLoadLocalFromJson('key', 'json', 'selecttoken')

Example

xCacheLoadLocalFromJson('NewAccounts', GetVar('InputJson'), 'Accounts')

 

From the example above we have put the following JSON into the variable 'InputJson' to be used by the function. We set the selecttoken to 'Accounts' so that we know what array is going to be used to load the xCacheCollection.

When the xCache collection is loaded it will have 4 rows that you can loop or perform operations on. The 4 rows will consist of 2 columns one called  'id' and one called 'accountname''.

 

InputJson:
     {
            "Accounts":
                [
                    { "id": "1001", "accountname": "Microsoft" },
                    { "id": "1002", "accountname": "Oracle" },
                    { "id": "1003", "accountname": "SAP" },
                    { "id": "1004", "accountname": "Salesforce" }
                ]
        }