Is this jinja array or list if it starts with [u' ?
17 views
Skip to first unread message
Abey Thomas
unread,
Oct 27, 2017, 12:11:37 PM10/27/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hi,
I tried to convert a hash to a list. When I try to debug my list its showing
"msg": " [u'value1', u'value2']\n"
Looks like an array to me. What kind of object is this? Can i convert this back to list? I tried to do us append(value) in a loop to build this value array
Regards, Abey
Brian Coca
unread,
Oct 27, 2017, 12:25:17 PM10/27/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Array and List are 2 different names for the same thing, what you are
seeing is an array/list of unicode strings (leading u' ' in front of
string means its unicode in Python).