Here is my Js array
["field", "description", "example"]
I want to convert it into this
columnDefs: [
{
headerName: "Field",
field: "field",
},
{
headerName: "Description",
field: "description",
},
{
headerName: "Example",
field: "example",
}
],
Please help me out, how can I construct the above-mentioned Js array format.
.map()my Json arraymakes little sense.