How does the tree of iview make the data transmitted in the background consistent with the structure of the official website?

how do the data formats of these two pictures correspond? It is said on the Internet that it can be realized by recursion? How to operate it exactly? Thank you for your advice!

Mar.16,2021

simply write a method:

resetTree (oldTree) {
            let newTree = oldTree.map(item => {
                if (item.children) {
                    return {
                        ...item,
                        title: item.name,
                        children: this.resetTree(item.children)
                    }
                } else {
                    return {
                        ...item,
                        title: item.name
                    }
                }
            })
            return newTree
        }
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-1b37ced-2c0d0.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-1b37ced-2c0d0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?