How to convert an array with data objects to just an array with strings with javascripts. This is the data set below
const Cars = [
{ carTypes: 'Cadillac' },
{ carTypes: 'Jaguar' },
{ carTypes: 'Audi' },
{ carTypes: 'Toyota' },
{ carTypes: 'Honda' },
];
This is the results i would like to get const models = ['Cadillac', 'Jaguar', 'Audi', 'Toyota', 'Honda'];
I tried this below but it didn't work
function OnFucTap() {
const Cars = [
{ carTypes: 'Cadillac' },
{ carTypes: 'Jaguar' },
{ carTypes: 'Audi' },
{ carTypes: 'Toyota' },
{ carTypes: 'Honda' },
];
const models = Cars.carTypes.split(',');
console.log(models);
alert(models);
}