How to reset value for sObject variable in controller in Salesforce lightning component?

Sample Code:

component.set("v.newItem",{ 'sobjectType': 'Camping_Item__c',
                    'Name': '',
                    'Quantity__c': 0,
                    'Price__c': 0,
                    'Packed__c': false }/>);

Cheers!!!

2 comments:

  1. Replies
    1. You have to write this JavaScript Controller or helper. Are you getting any error?

      Delete