data.item — renameTo()
Description
The renameTo() method of the item object renames a stored dataset while preserving its contents.
Signature
data(sourceKey).renameTo(targetKey)Arguments
sourceKey(string)- The current name of the dataset.
targetKey(string)- The new name of the dataset.
Example
// rename a dataset to another
data.item('old_table').renameTo('new_table');