Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const currentRow = this.answers.filter(x => x.id === id);
- const withoutCurrentRow = this.answers.filter(x => x.id !== id);
- this.answers = this.answers.filter(x => x.id !== withoutCurrentRow[0].id);
- this.answers.unshift(withoutCurrentRow[0]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement