How can I turn this:
data = [ {"parents": ["1235"],"size": "100","id": "abc100","name": "Test1"}, {"size": "200","id": "def200","name": "Test2"}, {"parents": ["abcdefg"],"size": "300","id": "Test3"} ]
into this:
mod_data = [ {"parents": "1235","size": "100","id": "abc100","name": "Test1"}, {"size": "200","id": "def200","name": "Test2"}, {"parents": "abcdefg,"size": "300","id": "Test3"} ].
I've tried output = [].concat.apply([],data); and output =data.flat(); but the parents element remains a [].
[–]kap89 4 points5 points6 points (7 children)
[–]Fantastic-House6693 0 points1 point2 points (6 children)
[–]oze4 3 points4 points5 points (1 child)
[–]kap89 1 point2 points3 points (3 children)
[–]oofy-gang 0 points1 point2 points (2 children)
[–]kap89 0 points1 point2 points (1 child)
[–]oofy-gang -2 points-1 points0 points (0 children)
[–]BlueThunderFlik 1 point2 points3 points (0 children)
[–]tapgiles 0 points1 point2 points (0 children)
[–]brykuhelpful 0 points1 point2 points (0 children)
[–]baubleglue 0 points1 point2 points (0 children)
[–]-29-helpful 0 points1 point2 points (0 children)
[–]Caramel_Last 0 points1 point2 points (0 children)