From 4d2f4172385b486ddb508df5aa334db23f81f3be Mon Sep 17 00:00:00 2001 From: Gergo Rostasi Date: Sat, 11 Aug 2018 16:01:33 +0200 Subject: [PATCH] Nested arrays fix --- src/prettyPrint.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/prettyPrint.ts b/src/prettyPrint.ts index dd15f9c..4235d99 100755 --- a/src/prettyPrint.ts +++ b/src/prettyPrint.ts @@ -205,6 +205,8 @@ const printArray = (array: {}[], out: PrintWriter, idt: number, selection: objec case 'object': if (value == null) { out.print('null'); + } else if (Array.isArray(value)) { + printArray(value, out, idt + 1, selection, options); } else { printObject(value, out, idt + 1, selection, options); }