From 1c05f8b09bf5727a6e0c0b124f77684635dcf9a8 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 24 Oct 2022 09:33:46 -0500 Subject: route: T4772: return list of dicts in 'raw' output --- src/op_mode/route.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/op_mode/route.py b/src/op_mode/route.py index e1eee5bbf..d11b00ba0 100755 --- a/src/op_mode/route.py +++ b/src/op_mode/route.py @@ -83,7 +83,12 @@ def show(raw: bool, if raw: from json import loads - return loads(output) + d = loads(output) + collect = [] + for k,_ in d.items(): + for l in d[k]: + collect.append(l) + return collect else: return output -- cgit v1.2.3