Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

getkey by value js

function getKeyByValue(object, value) {
  return Object.keys(object).find(key => object[key] === value);
}
 
PREVIOUS NEXT
Tagged: #getkey #js
ADD COMMENT
Topic
Name
5+2 =