Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

select column values from array typescript

var result1 = [
    {id:1, name:'Sandra', type:'user', username:'sandra'},
    {id:2, name:'John', type:'admin', username:'johnny2'},
    {id:3, name:'Peter', type:'user', username:'pete'},
    {id:4, name:'Bobby', type:'user', username:'be_bob'}];
    
 
var data = result1.map(t=>t.name);
console.log(data);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #column #values #array #typescript
ADD COMMENT
Topic
Name
8+5 =