You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from jsonpath_ng import parse
selector = '$.*.number'
data = {
'foo': ['abc', 'def'],
'bar': {'number': 123456},
'boolean': True
}
val = '98765'
expr = parse(selector)
expr.update(data, val)
Expected
'number' field to be updated to '98765'.
Observed
File "/home/andrew/test.py", line 12, in <module>
expr.update(data, val)
File "/home/andrew/jsonpath_ng/jsonpath.py", line 261, in update
self.right.update(datum.value, val)
File "/home/andrew/jsonpath_ng/jsonpath.py", line 526, in update
if field in data:
TypeError: argument of type 'bool' is not iterable
The text was updated successfully, but these errors were encountered:
Related to #47
Steps to reproduce:
Expected
'number'
field to be updated to'98765'
.Observed
The text was updated successfully, but these errors were encountered: