WebDataRocks End User License Agreement (“Agreement”) has been revised and is effective as of April 18, 2024.
The following modifications have been made:
The modified version of WebDataRocks End User License Agreement is available here.
Downloading, installing, and/or continuing to use WebDataRocks after April 18, 2024, constitutes your acceptance of the terms and conditions of the modified version of WebDataRocks End User License Agreement. If you do not agree to any of these terms and conditions, do not download, install, use, or access (or continue to access) WebDataRocks.
The mapping object for JSON is specified as the first element of the JSON array. This object is used for setting data types, creating multilevel hierarchies, and changing captions.
Name | Type | Description |
---|---|---|
type | String | optional The field’s data type. Possible values:
|
caption | String | optional The field’s caption. |
hierarchy | String | optional The name of the hierarchy. Used for multilevel hierarchies. Set this property to make the field a level of the specified hierarchy. In this case, the type must be set to "level" . |
parent | String | optional The caption of the parent hierarchy level. Used for multilevel hierarchies. In this case, the type must be set to "level" . |
level | String | optional The caption of the hierarchy level. Used for multilevel hierarchies. In this case, the type must be set to "level" . |
1) Setting the mapping object in a JSON array of objects:
let jsonData = [ { "Product": { type: "string" }, "Price": { type: "number" } }, { "Product": "Apple", "Price": 2.50 }, { "Product": "Cherry", "Price": 5.25 } ];
See the full example on CodePen.
2) Setting the mapping object in a JSON array of arrays:
let jsonData = [ { "Product": { type: "string" }, "Price": { type: "number" }, }, ["Apple", 2.50], ["Cherry", 5.25] ];
Try a live demo on CodePen.