how often does the letter ")" occur in:
q: display data from multiple column to multiple rows in lwc i have a custom records which has  follwing columns. 
father first name, father last name, father email, father cell,
mother first name, mother last name, mother email, mother cell
guardian firstname, guardian lastname, guardian email, guardian cell 
all the above data's are stored in single rows. i have a task to display the data in multiple rows. i'm using data table, not sure we have any other way to achieve this. please help me on this. thanks in advance
<lightning-datatable key-field="id" data={parameters} columns={columns}
                                    draft-values={draftvalues} hide-checkbox-column="true" resize-column-disabled="true">   </lightning-datatable>

js:
 const cols = [
{ label: 'first name', fieldname: 'father_first_name__c', editable: false },
{ label: 'first name', fieldname: 'father_last_name__c', editable: false },
{ label: 'first name', fieldname: 'father_email__c', editable: false },
{ label: 'first name', fieldname: 'father_cell__c', editable: false }
];  

@wire(getparentguardian,{enrollmentid : "dd"})

enroll(result){
this.wireddataresult = result;
if (result.data) {
    this.parameters  = result.data;
    this.error = undefined;         
    } else if (result.error) {
    this.error = result.error;
    this.parameters  = undefined;
    }
}

controller:
public with sharing  class getparentguardiancontroller {

 @auraenabled (cacheable = true)
public static list<enrollment__c> getparentguardian(string enrollmentid) {
    system.debug('enrol ' + enrollmentid);
    return [select id, father_first_name__c, father_last_name__c, father_email__c, father_cell__c,
            mother_first_name__c, mother_last_name__c, mother_email__c, mother_cell__c
            from enrollment__c where name=: 'e0008'];
}
}


a: i think you want to display same record in different rows, something below.
first name | last name | email | cell
#1 row
#2 row

create cols in js i.e
 const cols = [
{ label: 'first name', fieldname: 'firstname', editable: false },
{ label: 'last name', fieldname: 'lastname', editable: false },
{ label: 'email', fieldname: 'email', editable: false },
{ label: 'phone', fieldname: 'cell', editable: false }
]; 

option 1 
create wrapper class in apex i.e
class data{
 string firstname;
 string lastname;
 string email;
 string phone;
}

use this wrapper class to bind the data, for loop-through to soql. i.e
for (  enrollment__c obj : [select id, father_first_name__c, father_last_name__c from enrollment__c where name=: 'e0008'] ){
data.add(obj.father_first_name__c,obj.father_last_name__c,obj.father_email__c,obj.father_cell__c);
#same to add for mother row.
....
....
}

option 2
you can achieve also to create object in js i.e
    let data = []
    response.data.map(val =>{ 
    data.push({'firstname' : val.father_first_name__c, 'lastname' :val.father_last_name__c ...})
   //for mother
   data.push()
   //other
   data.push()
    })


a: to iterate data in table : 
 lwcmethodname(){

    apexclassmethodname({}).then(data => {

        if(data){

            console.log("data= "+json.stringify(data, null, '\t'))

            for (let i = 0; i<data.length; i++) { //data is been iterated

                const rec = data[i]; /*data at i index is allocated to rec 
                                         for easy access*/

                /*assigning data in json format to the specific column names 
                  as per table*/

                const tempjson = {name: (i+1).tostring(), 

                    id: rec.id,

                    subject: rec.subject,

                    assigned: rec.owner.name,

                    priority: rec.priority,

                    status: rec.status

                }

                datatabledata.push(tempjson)

            }

        }

    }).catch(error => {

        console.error("#**** error="+error)

    })

}


user
The given text has 25 ")"s.
assistant