I have two objects. I am trying to do like :
var obj1 = {
abc_name: "Jack",
abc_age: 24
}
var obj2 = {
xyz_name: "Mike",
xyz_age: 22
}
Expected Output be like :
var obj = [{
fieldName: "Name",
abc_name: "Jack",
xyz_name: "Mike"
},
{
fieldName: "Age",
abc_age: 24,
xyz_age: 22
}]
I am trying with the nested for-in loop. But not getting expected results. Any better solution or idea ? Thanks in advance