}
if (!param) break;
jv_dump(jv_copy(param->sv.value), 0);
- printf("<%d>", jv_get_refcnt(param->sv.value));
+ //printf("<%d>", jv_get_refcnt(param->sv.value));
+ printf("<%d>", param->sv.pathidx);
}
if (backtracking) printf("\t<backtracking>");
jv_free(path_end.value);
jv path = jv_array();
for (int i=path_start.pathidx; i<path_end.pathidx; i++) {
- path = jv_array_set(path, i, jv_copy(jq->pathbuf[i]));
+ path = jv_array_append(path, jv_copy(jq->pathbuf[i]));
}
stack_push(jq, stackval_replace(path_start, path));
break;
.foo[.baz]
{"foo":{"bar":4},"baz":"bar"}
4
+
+.[] | .error = "no, it's OK"
+[{"error":true}]
+{"error": "no, it's OK"}
+
+[{a:1}] | .[] | .a=999
+null
+{"a": 999}