Is there any dark magic to split a single object into multiple objects in js

there is currently such an object as follows:

clipboard.png

:

clipboard.png

:

clipboard.png

Jan.13,2022

No dark magic or coquettish operations. Just go through the b in the attribute and generate a new object


.

there is no dark magic, but it is not troublesome to implement it with es6

const arr = {
  opinionVO: [
    {a: '', b: '1,2,3', c: 10047},
    {a: '', b: '4,5,6', c: 10047},
  ],
};

const result = {
  ...arr,
  opinionVO: arr.opinionVO.reduce((res, item) => res.concat(...item.b.split(',').map(b => ({...item, b}))), []),
};

console.log(result)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8222-1eb4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8222-1eb4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?