summaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin.c b/builtin.c
index f5c48a6a..aac993db 100644
--- a/builtin.c
+++ b/builtin.c
@@ -679,7 +679,7 @@ static const char* const jq_builtins[] = {
"def index(i): .[i][0];",
"def rindex(i): .[i][-1:][0];",
"def paths: path(recurse(if (type|. == \"array\" or . == \"object\") then .[] else empty end))|select(length > 0);",
- "def leaf_paths: . as $dot|paths|select(. as $p|$dot|getpath($p)|type|. == \"array\" or . == \"object\");",
+ "def leaf_paths: . as $dot|paths|select(. as $p|$dot|getpath($p)|type|. != \"array\" and . != \"object\");",
};