I am writing this post after having read several threads concerning this topic but no one of them gives me what I need. This post seems to have the solution but I do not hav
Your countries like
{id: 1, name: 'Italia',checked:false},
Your html like
{{country.name}}
You'll get an array like, e.g.
[{id: 1, name: 'Italia',checked:false},{id: 2, name: 'Brasile',checked:tue}..]
you can do
result=this.countries.filter(x=>x.checked).map(x=>x.id) //result becomes [2,...]