-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fnJq regression #113
Comments
a bug got into 18, its about placeholders. fixed in beta. will make
release today.
can you check if it fixes yours too?
|
Hi. Found the issue, not related to AF. This stopped working also between jq 1.6 to jq 1.7 in the CLI [root@centos1 forms]# jq --version /tmp/jq-linux-amd64 '. | [leaf_paths as $path | {"key": $path | join("^"), "value": getpath($path)}]' /tmp/a.json IS there any chance to downgrade your node-js package ? |
that’s a bit difficult, is it a new bug in jq or was it to fix a bug in jq?
|
looks like a new bug |
This is in version 1.6.2. leaf_paths is an alias and will be deprecated. Now, how unfortunate this is for you, I can't just stay on older version because of deprecated code. |
This is closed... it's a deprecated jq issue |
Hi there Mr Guy!
I think something changed from previous versions.
This used to work:
name: flat_service_info
expression: "fn.fnJq($(settings),'.|[leaf_paths as $path|{key: $path|join("^"), value: getpath($path)}]')"
hide: true
noOutput: true
It’s working using jq CLI :
[root@centos1 forms]# cat /tmp/a.json | jq '.| [leaf_paths as $path | {"key": $path | join("^"), "value": getpath($path)}]'
[
{
"key": "Home Dir^koko^yoyo^jojo^prod^cifsaccess^ntfs_acls^acls^0^access",
"value": "modify"
},
…
AF log entry returns this:
2023-11-19 10:09:42:942 error: Error in fnJq : jq: error: leaf_paths/0 is not defined at , line 1:
def fn2KB: ./1024;def fn2MB: ./1024/1024;def fn2GB: ./1024/1024/1024;def fnRound0: .*1.0 + 0.5|floor/1.0;def fnRound1: .*10.0 + 0.5|floor/10.0;def fnRound2: .*100.0 + 0.5|floor/100.0;def fnRound: .*100.0 + 0.5|floor/100.0;.services|[leaf_paths as $path|{key: $path|join("^"), value: getpath($path)}]
for testing purposes, it should work on any JSON input
The text was updated successfully, but these errors were encountered: