const selectedPlaces=[
{ name: 'Stockholm', isChecked: true },
{ name: 'Dubai', isChecked: true },
{ name: 'San Francisco', isChecked: 'false' },
]
const tempSelectedPlace = selectedPlaces.filter(place => place.isChecked === true);
//[{ name: 'Stockholm', isChecked: true },{ name: 'Dubai', isChecked: true },]
const selectedPlace = tempSelectedPlace.map(place => place.name).join(', ')
console.log(selectedPlace)
//Stockholm,Dubai