Aug-23-2021, 05:15 PM
look for help for the below:
i have list of item in array;
i have list of item in array;
for row in rows: t=(row[0]) rowarray_list.append(t)when convert to key value
j_string=','.join(rowarray_list) j=json.dumps({"_meta":{ "hostvars":{}},"instances":{"hosts":[j_string],"vars":{}}})it give me
{"_meta": {"hostvars": {}}, "instances": {"hosts": ["abc,efg"], "vars": {}}} instead {"_meta": {"hostvars": {}}, "instances": {"hosts": ["abc","efg"], "vars": {}}}Thanks in advance