If you have the following article array
[ { id: 1, slug: 'abc', url: 'https://' }, { id: 2, slug: 'def', url: 'https://' }, { id: 3, slug: 'ghi', url: 'https://' }, ]
You can use a method similar to this.array.filter(post => post.slug !== this.$route.params.slug)
to filter.
If this.$route.params.slug
is equal to def
, it will only give posts with ids 1
and 3
.