Currently I have some data in the format of
data : {
full_name: 'John Doe',
date_of_birth: '01-01-1990'
}
I want to render it in a table format which would sort of look like
Full Name : John Doe
Date Of Birth: 01-01-1990
If it was an array, I could just do something like
data.map((item) => <h1>item</h1>
but I also need the to print the key.
How do I achieve something like this in a single loop like function? I could have used map in case of an array, but I also need to render the key part of the object.
NOTE: Data object cannot be changed.