Is your feature request related to a problem or challenge? Please describe what you are trying to do.
You can create a VariantPath from a string like this:
let path = VariantPath::from("city.store");
However, that format does not currently support selecting array elements
So for example, there is no way to parse the equivalent of this (select the title from the 4th book): city.store.books[3].title
Describe the solution you'd like
I would like to be able to do something like
VariantPath::from("city.store.books[3].title");
And get the equivalent of
VariantPath::from("city")
.join("store")
.join("books")
.join(3)
.join("title")
Describe alternatives you've considered
Additional context
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
You can create a
VariantPathfrom a string like this:However, that format does not currently support selecting array elements
So for example, there is no way to parse the equivalent of this (select the title from the 4th book):
city.store.books[3].titleDescribe the solution you'd like
I would like to be able to do something like
And get the equivalent of
Describe alternatives you've considered
Additional context