Here is my object:
const arr = [
{ name: 'Breaking Bad S01E07' },
{ name: 'Breaking Bad S01E06' },
{ name: 'Dexter S01E05' },
{ name: 'Dexter S01E02' },
{ name: 'Dexter S01E07' },
];
I want to extract just values and I used Object.values but it don't change.
Here is my code:
val = Object.values(arr);
console.log(val);
But what I get is exactly the same without Object.values. It doesn't return values. I returns keys + values.
I used map on it cuz it is an array of objects but it returns undefined!
const map = arr.map((x) => {
Object.values(x);
});
console.log(map);
here is what I get:
[ undefined, undefined, undefined, undefined, undefined ]