After I call the API I got this result:
[
{
"id_auto_mapping": 1,
"feed_field": "id",
"internal_field": "id"
},
{
"id_auto_mapping": 2,
"feed_field": "url",
"internal_field": "url"
},
{
"id_auto_mapping": 3,
"feed_field": "price",
"internal_field": "price"
}
]
and I loop through the result and save the keys to autoMappings
array:
if( response.data.success ) {
if( response.data.auto_mappings.length > 0 ) {
response.data.auto_mappings.forEach( ( item ) => {
this.autoMappings.push(item.feed_field)
})
}
}
Now, If I do console like:
console.log( this.autoMappings )
I got this result:
Why is it saving as an observer instead of normal array?
How can I loop through the observer?