Is your feature request related to a problem? Please describe.
We have at_path() which can provide us to use absolute path to get value.
How about we also provide similar method to set value?
Describe the solution you'd like
Here, assuming we want to retrieve: base.derived[0].key, for get we have: table.at_path("base.derived[0].key");
for set, seems we could do something like this: table.set_path("base.derived[0].key", 42);, or table.emplace(toml::absolute_path("base.derived[0].key"), 42);
Additional context
JSON has JSON path to access data, see here: Here, and this does simplify the development.
I think if provide similar feature, developing with toml will get much easier :)
Is your feature request related to a problem? Please describe.
We have at_path() which can provide us to use absolute path to get value. How about we also provide similar method to set value?
Describe the solution you'd like
Here, assuming we want to retrieve:
base.derived[0].key
, for get we have:table.at_path("base.derived[0].key");
for set, seems we could do something like this:table.set_path("base.derived[0].key", 42);
, ortable.emplace(toml::absolute_path("base.derived[0].key"), 42);
Additional context
JSON has JSON path to access data, see here: Here, and this does simplify the development. I think if provide similar feature, developing with toml will get much easier :)