JSONToDataSource

Populates an existing data source with the array items for a specific JSON path.

Syntax

JSONToDataSource( JSONObject, JSONPath, IsDataAppended, DataSourceName, ModelReference );

Parameters

Parameter Name Type Description Optional? Default Value
JSONObject String The keyword of a JSON object whose contents will be used to populate the data source. No n/a
JSONPath String The path in JSONObject containing the data. No n/a
IsDataAppended Boolean Determines whether the new JSON data should be appended to the existing data or replace it. If the latter option is used, the data source will be cleared when this function runs. No n/a
DataSourceName String The name of the data source to populate. No n/a
ModelReference String The model reference associated with the chosen data source. If the function is called by a model, it assumes the data source exists within that model, so you do not need to specify a reference unless the data source exists in a different model on the same repository. If the function is called outside the context of a model - for example, in a web page expression or via the DATASOURCE element tag - you must specify the model containing the data source. Yes ""

Output

If successful, the function will return a value of True; otherwise, it will return an error message.