How can I create a header for my react table based on the API response?
for example the data I don't want to define columns manually for the table, so how can I create the headers dynamically from the keys of the object
let testData = [
{
"id": "1",
"name": "test",
"namespace": "test",
"description": "test",
},
{
"id": "2",
"name": "test2",
"namespace": "test2",
"description": "test2",
} ]
see answer below