Skip to content

Keymapper logic reverse, same as JSONModel.

Latest
Compare
Choose a tag to compare
@dayitv89 dayitv89 released this 05 Oct 13:10
· 6 commits to master since this release

keys are like id, first_name and change it as id => appID, first_name => firstName
pass args as {id: 'appID', first_name: 'firstName'}

constructor(json) {
   super(json);
   if (this.validate(json)) {
      this.keyMapper({first_name: 'firstName', last_name: 'lastName'});
   }
}