Skip to content

Commit 1936150

Browse files
committed
fix: stringify & format result from the eval on the expression so we can unpack inner objects
1 parent e192714 commit 1936150

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ function parseArgs() {
4848
}
4949

5050
const { expression, object } = parseArgs();
51+
const result = jsonata(expression).evaluate(object);
5152
// eslint-disable-next-line no-console
52-
console.log(jsonata(expression).evaluate(object));
53+
console.log(JSON.stringify(result, null, 2));

0 commit comments

Comments
 (0)