My json file data.json
looks like this
[
{"host" : "192.168.0.25", "username":"server2", "path":"/home/server/.ssh/01_id"},
{"host" : "192.168.0.26", "username":"server3", "path":"/home/server/.ssh/01_id"}
]
I want the loop happen in this way only (lets ignore the remote variable)
for remotes,host,username in zip(remote , data["host"] ,data["username"]):
This is the error i am getting
for remotes,host,username in list(zip(remote , data["host"] ,data["username"])):
TypeError: list indices must be integers or slices, not str