I have an object with nested properties:
{
a: {
b: {
c: { min: 1, max: 2 },
d: 1
}
}
}
The nesting can be any amount of levels deep. It ends in either an object with one of the properties (min, max, in) or as a non object (string, number, bool)
I would like to generate a string for the path to those endpoints.
E.g. for above object I would like the following result:
objPaths(a)
=> {
"a.b.c": { min: 1, max: 2 }
"a.b.d": 1
}