data.item — set()
Description
The set() method of the item object saves a value in the notebook datasets under the specified name, making it available across notebook cells.
Signature
data.item(key).set(value)Arguments
key(string)- The name under which the value will be stored.
value(any)- The value to store in the notebook datasets. The value must be JSON-serializable.
Example
// create a data table
var table = [
['A', 'B'],
['C', 'D']
];
// store the data table
data.item('table').set(table);