I have the following code :-
var dataSub = [];
$.each(dataObj.EmployeeDetail, function (idx, obj) {
$.each(columnDb, function (idx1, obj1) {
dataSub.push(obj[obj1.title]);
});
});
In dataObj.EmployeeDetail
I have data like this :-
Object 0 : { Address1: "123",Address2: null,Category: 1,Children: 0,City: "Xyxz" }
Object 1 : { Address1: "456",Address2: null,Category: 1,Children: 0,City: "Abc" }
In columnDb
I have data like this :-
Object 0 : title: "ADDRESS1"
Object 1 : title: "CITY"
As you can see the data in columnDB
is in uppercase(dynamic data), my dataSub
always remains empty because title
it is not matching with dataObj.EmployeeDetail
.
How to solve this issue?