[Fix] Multidigit array index

- Allow array index in substitution destinations to have
  multiple digits

Change-Id: I8ef6241763dd7d841e25774fa041f7f4a3b11c7b
This commit is contained in:
Scott Hussey 2018-04-05 16:46:55 -05:00
parent 24b4cf0420
commit 4d90257372
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ def _populate_data_with_attributes(jsonpath, data):
# Populates ``data`` with any path specified in ``jsonpath``. For example,
# 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.
array_re = re.compile(r'.*\[\d\].*')
array_re = re.compile(r'.*\[\d+\].*')
d = data
for path in jsonpath.split('.')[1:]: