iview table defaults to accepting only non-nested array objects in the following format
data: [{
name: "John Brown",
age: 18,
address: "New York No. 1 Lake Park",
date: "2016-10-03"
},
{
name: "Jim Green",
age: 24,
address: "London No. 1 Lake Park",
date: "2016-10-01"
}
]
but the data now returned by the backend is a nested array object, similar to the following:
data: [{value: "jiangsu",
label: "",
children: [
{
value: "nanjing",
label: "",
children: [
{
value: "fuzimiao",
label: "",
}
]
}
]
is there a way for table to accept data in this nested format? Or is there any way to process data in this nested format into a format acceptable to table?