Skip to Content
Menu
This question has been flagged
1033 Rodiniai

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
​}
]
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
bal. 24
2223
1
rugp. 22
3003
0
geg. 17
7658
1
kov. 15
4075
2
kov. 15
4611