Jul-01-2019, 09:37 PM
(Jul-01-2019, 08:04 PM)graham23s Wrote: for line in _json.split(y):If
_json
is a string, that line should be giving an error. I don't understand what you're trying to accomplish with that, since y
is a dict. You should be able to just iterate over the actions directly:y = json.loads(_json) if "action" in y: for action in y["action"]: parts = action.split("|") print(parts)