Skip to Content
Menú
This question has been flagged
1039 Vistes

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
​}
]
Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
d’abr. 24
2230
1
d’ag. 22
3035
0
de maig 17
7696
1
de març 15
4082
2
de març 15
4617