at allows us to fetch a sub-tree from property-tree
at allows us to fetch a sub-tree from property-tree
Example:
Given a config:
{
x : [ a, b, c ]
}
at("x") // returns Some([a, b, c])
at("x").atIndex(2) // returns Some(Leaf("c"))
at("x").atKey("y") // returns None
Similarly, given a more complex config:
{
x : [
{
y1: 1
y2: 2
y3: 3
}
{
y1: 1
y2: 2
y3: 3
}
]
}
at("x").atIndex(0).atKey("y1") // returns Some(Leaf(v1)