I want to create a list using the fields in FhExtra and other fields in the FhExtraImportResults. There are many fields in this class , i just put few.I cannot edit FhExtraImportResults and FhExtra because its using in other places.
I am trying to create new list and setting the fields manually . Is there any better way to create new list with these fields ?
The object i am receiving to convert is List of FhExtraImportResults.
<code>public class FhExtraImportResults {
FhExtra record;
String error;
Long loanId;
}
@Data
public class FhExtra {
String LoanNumber;
String FILoanNumber;
}
</code>
<code>public class FhExtraImportResults {
FhExtra record;
String error;
Long loanId;
}
@Data
public class FhExtra {
String LoanNumber;
String FILoanNumber;
}
</code>
public class FhExtraImportResults {
FhExtra record;
String error;
Long loanId;
}
@Data
public class FhExtra {
String LoanNumber;
String FILoanNumber;
}
My expected list object looks like
<code>[{
LoanNumber : 123
FILoanNumber : 321
error : NA
loanId : 456
}]
</code>
<code>[{
LoanNumber : 123
FILoanNumber : 321
error : NA
loanId : 456
}]
</code>
[{
LoanNumber : 123
FILoanNumber : 321
error : NA
loanId : 456
}]