data.item — exists()

Description

The exists() method of the item object determines whether a dataset with the specified name exists.

Signature

data.item(key).exists()
Scope
data
Family
item
Returns
boolean

Argument

key (string)
The name of the dataset to look for.

Returns

exists (boolean)
true if a dataset with the specified name exists; otherwise false.

Example

// check if a 'revenue' dataset exists
var revenueExists = data.item('revenue').exists();

// log the result
notebook.log(revenueExists);