-
Notifications
You must be signed in to change notification settings - Fork 60
sub-map node not change when mapping #93
Copy link
Copy link
Open
Description
I would like to have a sub-map when mapping so I don't have to type the path repeatedly
e.x. json is
[
"test": "abc",
"sub": [
"int": 9,
"string": "8"
]
]
and my mapping function is
try mainString <~> map["test"]
let subMap = map["sub"]
try subInt <~> subMap["int"]
try subString <~> subMap["string"]
but when I do let subMap = map["sub"]
the subMap.node is still original node since subscript only change result
// file Map.swift line 102
public subscript(keys: [PathIndex]) -> Map {
lastPath = keys
result = node[keys]
return self
}
should it also change node to node[keys]?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels