Let's say I've got the following javascript object
var obj = {
a:{
b:"value",
c:{
d:"value2"
}
}
}
What function would, when input with the "d" object (for example, function getPath(obj, d)), output the "a.c.d" string? I've tried various things including object-path, but it doesn't seem to be designed for that
path(obj.a.c.d), then there is no way to get the desired outcome (because all the function gets is the string value"value2", it doesn't, and cannot, know aboutobj).obj = {d:{d:{d:{d:"val"}}}}when asked for d? does it returnd,d.d,d.d.dord.d.d.d?d.d.d.d@Felix Kling Would it not be possible if you also input "obj"?