Variables containing -

14 views
Skip to first unread message

Anil Kommareddy

unread,
Oct 16, 2021, 2:57:43 AM10/16/21
to Ansible Project
Hi All,

I am retrieving data from storage array.  The results are in json format.  These results contain variables with "-" i.e. minus symbol in their names.  When I try to access data in those variables, I get an error "Make sure your variable name does not contain invalid characters like '-': unsupported operand type".  

Is there any way I can escape - symbol in variable name.  I am trying to access the variable in the following format {{ result.json.cli-parameters }}.

Thanks
Anil
Reply all
Reply to author
Forward
0 new messages