diff --git a/lib/cli.js b/lib/cli.js index eb5dbf4..0eb3a88 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -154,7 +154,9 @@ function main (args) { // from http://stackoverflow.com/questions/1359761/sorting-a-json-object-in-javascript function sortObject(o) { - if (Object.prototype.toString.call(o) !== '[object Object]') { + if (Array.isArray(o)) { + return o.map(sortObject); + } else if (Object.prototype.toString.call(o) !== '[object Object]') { return o; }