.renameData - PeterNaydenov/code-assembly-line GitHub Wiki
Change name of data record/records.
tplEngine.renameData ( {oldName : newName} )
- oldName: string. Name of existing data-record;
- newName: string. Desired new data-record name;
- Method return options:
- tplEngine;
- Method is chainable;
Example:
const data = {
'alt' : 'This image has no alt text.'
, 'user' : 'user unknown'
}
tplEngine.insertData ( data )
// Now data is loaded
tplEngine.renameData ( { 'alt' : 'altTag' } )
// -> Available data-records are 'altTag' and 'user'.