Trying to access the wrapper class variable in javascript, but it's not serialized in apex controller. trying to get the value in for loop - mainly for validation purpose.
function validateApplicantInfo(thisvar, AddFields){
/* Result from AddFields
[MFF_Fields:[MFF_DateFldvalue=null, MFF_DepFldList=(),
MFF_DepPicklistOpts=null, MFF_FieldLabel=Account Name, MFF_FieldName=Name,
MFF_FieldOrderNum=0, MFF_FieldType=String, MFF_FieldValue=null....
Need to loop through the wrapper class variables */
var records = [];
records = AddFields.MFF_Fields;
for(var i = 0; i< records.size; i++){
if($("[id$='stringFld']").val() == '' && records[i].MFF_RequiredField == true){
$("[id$='stringFld']").parent().addClass('slds-has-error');
isError = true;
}
}
PS- Wrapper object is not serialized in apex controller