function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shubham4462Shubham4462 

Can someone please help me with below codeRecord Edit form in aura:iteration get the object in JSON and pass it to Apex

{
var conList = component.get('v.contactList');
        var recCount =conList.length;
        alert(recCount);
 
        if(recCount==1){
        let eventFields = component.find("editForm");
        //How Can i get the Record Edit form data as JSON format.    
            console.log(eventFields);
        //eventFields.submit();
  }
AnudeepAnudeep (Salesforce Developers) 
JSON.Stringify() is usually used to convert into JSON format so you can try that on eventFields. If it doesn't work, you need to try and convert eventFields into an array format and use JSON.Stringify()
 
({
    handleSuccess : function(component, event, helper) {
        var payload = event.getParams();
        console.log(JSON.stringify(payload));
    }
})