1👍
✅
You can filter the fixtures first and then filter the id property from the filtered array
Here is the working code, it works perfectly
var self = this;
self.fixtures.filter(fixture => self.form.selectedFixture.map(x => x.id).includes(fixture.id)).map(fixture => fixture.id)
In your code add this inside your submit function, dont rewrite the existing this.form.selectedFixture, just craete a new variable assign to it and use then
submit() {
var self = this;
const selectedFixture = self.fixtures.filter(fixture => self.form.selectedFixture.map(x => x.id).includes(fixture.id)).map(fixture => fixture.id);
console.log(selectedFixture);
http.post('group/create', {
name: this.form.groupName,
fixtures: selectedFixture
}).then(result => {
this.groups.push(result);
}).catch(error => {
console.log((error));
});
this.resetForm();
},
Source:stackexchange.com