Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript search dictionary by value

function getKeyByValue(object, value) {
  return Object.keys(object).find(key => object[key] === value);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #search #dictionary
ADD COMMENT
Topic
Name
3+2 =