跳至內容
選單
此問題已被標幟
1065 瀏覽次數

When I call query to get data, my data:


 
const [dataRoom, setDataRoom] = useState({
​id: 0,
​image: '',
​imageAttachment = [{
​id: 0,
​image1920: ''
​}] 
})
 

Result: 

		​{
​"data": {
​"MyModel": [
{
​"id": 143,
​"imageAttachment": [
​​​{
​​"id": 132
​}​,
​​{
​"id": 133
​​}
​]
​}
​]
​}
}

I want to create new array:

Data = [
​{
​"id": 143,
​},
​{
​"id": 132
​},
​{
​"id": 133
​}
]
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
4月 24
2300
1
8月 22
3049
0
5月 17
7709
1
3月 15
4120
2
3月 15
4662