For some "extraction" operation I am trying to get the following snippet work, without using the spread operator, because IE 11 doesn't knows about spread operators.
works in Chrome, but not IE 11:
html_col_width =[{"targets":0, "width":50}, {"targets":1, "width":100},{"targets":2, "width":442}]
... some other code
order: [
[response.order_by_column, response.order_by]
],
columnDefs: [
...html_col_width,
{other: stuff},
{other: stuff}
})
See columnDefs: ...html_col_width
How can I achieve the following without the spread operator:
columnDefs: [
{"targets":0, "width":50},
{"targets":1, "width":100},
{"targets":2, "width":442},
{other: stuff},
{other: stuff}
})
I have read and tried the following, but this is not working if the array of objects contains 2 keys: Spread Operator equivalent in IE - Javascript. The content at the provided link is about merging different objects, which makes the question rather different.