Answers for "javascript find key from value"

4

js find key by value in object

Object.keys(object).find(key => object[key] === value)
Posted by: Guest on December-30-2020
3

getkey by value js

function getKeyByValue(object, value) {
  return Object.keys(object).find(key => object[key] === value);
}
Posted by: Guest on May-12-2021

Code answers related to "javascript find key from value"

Code answers related to "Javascript"

Browse Popular Code Answers by Language