Datenbank in JavaScript
var database =
{
"data" :
[
{"Id" : 1 , "Name" : "John Doe" , "Email" : "[email protected]" , "Phone" : *********** , "Department" : IT , Admission_Date: "1-1-2022"}
]
}
document.write("<tr>")
document.write("<td> + database.data[i].Id + "</td>")
document.write("<td> + database.data[i].Name + "</td>")
document.write("<td> + database.data[i].Email + "</td>")
document.write("<td> + database.data[i].Phone + "</td>")
document.write("<td> + database.data[i].Department + "</td>")
document.write("<td> + database.data[i].Admission_Date + "</td>")
document.write("</tr>")
if(database.data.length == 0)
{
document.getElementById("table").style.display = "none";
}
NOTE: Please Upvote my Answer!
DeveloperSelim