Resolve dot notation strings
import { notate } from "notate";
const obj = {
top_level: {
nested: {
value: "My Value",
},
},
};
notate(obj, "top_level.nested.value"); // 'My Value'
notate(obj, "top_level.missing.value"); // undefined
Resolve list notation as well
const obj = {
list: [{ name: "Alice" }, { name: "Bob" }],
};
notate(obj, "list[1].name"); // 'Bob'