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()Argument
key(string)- The name of the dataset to look for.
Returns
exists(boolean)trueif a dataset with the specified name exists; otherwisefalse.
Example
// check if a 'revenue' dataset exists
var revenueExists = data.item('revenue').exists();
// log the result
notebook.log(revenueExists);