Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1032 มุมมอง

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
​}
]
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Data for relations table แก้ไขแล้ว
1
เม.ย. 24
2223
1
ส.ค. 22
3003
0
พ.ค. 17
7658
1
มี.ค. 15
4075
2
มี.ค. 15
4611