Answers for "get key by value in javascript object"

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 "get key by value in javascript object"

Code answers related to "Javascript"

Browse Popular Code Answers by Language