swipl-devel icon indicating copy to clipboard operation
swipl-devel copied to clipboard

feature request: support lists in path expression dicts

Open grsjst opened this issue 6 years ago • 0 comments
trafficstars

the put(+KeyPath, +Value) predicate allows to add a value using a keypath. However, the keypath expression does not support lists currently.

Consider the following dict X = _{a:[_{b:Value}]}

I'd like to assign a value to Value using a keypath. Something like : Y = X.put(a[0]/b,"my value"). Note a[0] refers to the first element of the list, similar to a xpath expressions

thanks, joost

grsjst avatar Mar 06 '19 10:03 grsjst