I'm new to reactJS and I need to achieve a certain result. I have an array-
{
"column_01": 11,
"column_02": 123,
"column_03": "TEST0001.iml",
"column_04": "TEST0001.qsl",
"column_05": "2018-11-13 01:04:40",
"column_06": "PASSED",
"column_07": "4/0/4"
}
I need to add another set similar structure to that data and add up these to an array, such result should be:
{
"column_01": 11,
"column_02": 123,
"column_03": "TEST0001.iml",
"column_04": "TEST0001.qsl",
"column_05": "2018-11-13 01:04:40",
"column_06": "PASSED",
"column_07": "4/0/4"
},
{
"column_01": 12,
"column_02": 124,
"column_03": "TEST0001.imx",
"column_04": "TEST0001.qsx",
"column_05": "2018-11-13 01:04:40",
"column_06": "PASSED",
"column_07": "4/0/5"
}
…. how do I achieve that to in react js? so far these are my efforts but haven't succeed yet:
onTableViewChange(result){
const arr = [];
if (result) {
console.log(result.original);
arr.push(result.row);
}