JSFiddle - React, Tailwind, and code Playground
by techie bala
HTML
<ul id="aaa">
</ul>
JavaScript
var data = {
"financialInfo": {
"createdBy": "1000",
"status": "A",
"updatedBy": "0",
"version": "0",
"accountsLastMadeupDate": "",
"accountsNextDueDate": "",
"associationLogoid": "0",
"auditDates": "",
"bfaId": "0",
"bofid": "0",
"businessType": "Education",
},
};
var dataLabel = {
"financialInfoLabel": {
"createdBy": "Created By",
"status": "Status",
"updatedBy": "Updated By",
"version": "Version",
"accountsLastMadeupDate": "Last User Update",
"accountsNextDueDate": " Next Due Date",
"associationLogoid": "Association Logo ID",
"auditDates": "Audit Dates",
"bfaId": "BFA Id",
"bofid": "BOF Id",
"businessType": "Business Type",
},
};
var finObj = data.financialInfo;
var list = "";
for (var key in finObj) {
// alert(' name=' + key + ' value=' + finObj[key]);
// alert(dataLabel.financialInfoLabel[key]);
list += "<li>"+dataLabel.financialInfoLabel[key]+" : "+ finObj[key]+"</li>";
}
$("#aaa").html(list);