【发布时间】:2020-03-06 16:46:12
【问题描述】:
如果数组后有数组,如何在 JSON 中拆分数据?这是我的 JSON 格式
{
"status": "true",
"error": "",
"data": [
{
"id": 1,
"sections": [
{
"section_id": 1,
"position": []
}
]
}
]
}
所以,我正在使用 AXIOS 。此代码AXIOS
const url = '/api/v1/form/'
axios
.get(url)
.then(response => {
this.listing = response.data.data;
})
如何使用 response.data.data.sections 调用部分?我正在尝试,但错误未定义。请帮帮我谢谢
【问题讨论】:
-
well data 是一个数组,我怀疑你可以在没有索引的情况下使用它