0๐
if (article.position === 'first') {
let articlesList = this.$store.state.articles;
for (i = 0; i < articlesList.length; i++) {
if(articlesList[i].position === 'first')
articlesList[i].position = "none"
}
}
I am just making smallest changes possible without mentioning best practices and stuff.
Source:stackexchange.com