Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get particular key value from array of objects in javascrip

var array = [
    { name:"string 1", value:"this", other: "that" },
    { name:"string 2", value:"this", other: "that" }
];

var foundValue = array.filter(obj=>obj.name==='string 1');

console.log(foundValue);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #key #array #objects #javascrip
ADD COMMENT
Topic
Name
8+9 =