Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
Hello

Anecha Kuekharem AnechaS

😀
Hello
View GitHub Profile
@AnechaS
AnechaS / findPropertyPathWithValue.js
Last active May 21, 2021
Javascript find property path in object with a value.
View findPropertyPathWithValue.js
/**
* Find property path in the object with a value
*
* @param {object} obj
* @param {any} value
*
* @return {string}
*/
function findPropertyPathWithValue(obj, value) {
for (const key in obj) {