0

I'm making a query where I'm collecting data froma data table.. Here is what I get :

enter image description here

I want to push each value of the array in another array but here is what I get when I console.log() it :

enter image description here

Here is my function:

async getTagAvailable(){
    const email = 'loupj@mail.fr'
    const url = `http://192.168.1.51:3000/api/v1/get-tag-available/${email}`;
        fetch(url)
            .then(res => res.text())
            .then((result) => {
                const data_csv = JSON.parse(result);
                data_csv.forEach(d => {
                            const {
                                tag_property,
                            } = d;
                            if(tag_property.length > 0){
                                for(let i = 0; i < tag_property.length; i++){
                                    this.tag_available.push({
                                        tag_dispo: tag_property[i]
                                    });
                                }   
                            }
                        });
                        console.log(data_csv);
                console.log("tag disponibles :" +  this.tag_available);
            })
            .catch((error) => {
                console.log(error)
            });
},

Without strings @GrafiCode:

enter image description here

I'm sure the solution is easy but I can't find it

0 Answers0