[Fix] Multidigit array index
- Allow array index in substitution destinations to have multiple digits Change-Id: I8ef6241763dd7d841e25774fa041f7f4a3b11c7b
This commit is contained in:
parent
24b4cf0420
commit
4d90257372
@ -106,7 +106,7 @@ def _populate_data_with_attributes(jsonpath, data):
|
|||||||
# Populates ``data`` with any path specified in ``jsonpath``. For example,
|
# Populates ``data`` with any path specified in ``jsonpath``. For example,
|
||||||
# if jsonpath is ".foo[0].bar.baz" then for each subpath -- foo[0], bar,
|
# if jsonpath is ".foo[0].bar.baz" then for each subpath -- foo[0], bar,
|
||||||
# and baz -- that key will be added to ``data`` if missing.
|
# and baz -- that key will be added to ``data`` if missing.
|
||||||
array_re = re.compile(r'.*\[\d\].*')
|
array_re = re.compile(r'.*\[\d+\].*')
|
||||||
|
|
||||||
d = data
|
d = data
|
||||||
for path in jsonpath.split('.')[1:]:
|
for path in jsonpath.split('.')[1:]:
|
||||||
|
Loading…
Reference in New Issue
Block a user