- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
Description
The following code creates some parameters with subkey name values and a test dictionary:
// some parameters with subkey name values
"param1" : "subKey1",
"param2" : "subKey2",
"param3" : "subKey3",
"param4" : "subKey4",
// implicitly created dictionary
${testdict1.subKey1.subKey2.subKey3.subKey4} : 1,
Now subKey4 shall be overwritten. We use a kind of mixed syntax for that:
// several ways to access subKey4 at left hand side of the colon
${testdict1}[${param1}]['${param2}']['subKey3'][${param4}] : 2,
${testdict1.${param1}.subKey2.${param3}.subKey4} : 3,
Both lines work!
Now the same on the right hand side of the colon; access to subKey4:
This works:
"param5" : ${testdict1}[${param1}]['${param2}']['subKey3'][${param4}]
param5 has integer value 3.
This does not work:
"param6" : ${testdict1.${param1}.subKey2.${param3}.subKey4}
Result:
Error: 'Invalid nested parameter format: ${testdict1.${param1}.subKey2.${param3}.subKey4}  - The double quotes are missing!!!'!
This I do not understand. Why is this format invalid? My expectation would be that param6 has integer value 3.
Like proposed in error message, I added the quotes:
"param7" : "${testdict1.${param1}.subKey2.${param3}.subKey4}"
Result:
param7 has value 3. But it's an integer!
But because of the quotes around the expression, I would expect a string "3".
Metadata
Metadata
Assignees
Labels
Projects
Status