I need assistance with organizing my input fields that are categorized under different headings:-
<label>Customer</label>
<input type="text" ng-model="a.arr.customerName" name="arr[0]"/>
<input type="text" ng-model="a.arr.customerDOB" name="arr[0]"/>
<input type="text" ng-model="a.arr.customerPanNo" name="arr[0]"/>
<label>Employee</label>
<input type="text" ng-model="a.arr.employeeName" name="arr[1]"/>
<input type="text" ng-model="a.arr.employeeDOB" name="arr[1]"/>
<input type="text" ng-model="a.arr.employeePanNo" name="arr[1]"/>
<label>Contractors</label>
<input type="text" ng-model="a.arr.contractorName" name="arr[2]"/>
<input type="text" ng-model="a.arr.contractorDOB" name="arr[2]"/>
<input type="text" ng-model="a.arr.contractorPanNo" name="arr[2]"/>
I am looking to store the above data in the format:-
[{a.arr.customerName:any value},{a.arr.employeeName:any value},{a.arr.contractorName:any value}]
. However, the current structure I am achieving is:- {a.arr.customerName:any value,a.arr.employeeName:any value,a.arr.contractorName:any value}
.
Is there a solution for this issue?