I have:
[Object, Object]
0:Object
val1 : "123"
name: "John"
1:Object:
val2 : "123"
name: "John"
How i can get values from this array object? I need name values from this two object.
You can use Array.prototype.map() and directly return obj.name property:
const arr = [{val: "123", name: "John"}, {val: "123", name: "John"}];
const result = arr.map(obj => obj.name);
console.log(result);
values?array.map( object => object.name )