Map
The Map data type represents a collection of key/value pairs, where the keys are unique.

Examples

`values` argument of the "Extend datatable" adaptor
The "Extend datatable" adaptor accepts a Map for the values argument. This argument should provide mapping such that for a given value in the `source` column, a corresponding value should appear in the target column.
Given the following Datatable:
datatable.json
1
{
2
"columns": [
3
"city"
4
],
5
"rows": [
6
{ "city": "Manchester" },
7
{ "city": "London" }
8
]
9
}
Copied!
This map would assign a colour to each city:
map.json
1
[
2
[ "Manchester", "red" ],
3
[ "London", "blue" ]
4
]
Copied!
Resulting in this Datatable:
extended-datatable.json
1
{
2
"columns": [
3
"city",
4
"colour"
5
],
6
"rows": [
7
{ "city": "Manchester", "colour": "red" },
8
{ "city": "London", "colour": "blue" }
9
]
10
}
Copied!
Last modified 1d ago
Copy link
Contents
Examples