We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
vars
pyjq.first
Assertion failed: (JVP_HAS_KIND(key, JV_KIND_STRING))
Hello.
I am having the following issue regarding the use of vars argument.
This does not work:
data = dict( parameters= [ dict(name="PKG_TAG_NAME", value="trunk"), dict(name="GIT_COMMIT", value="master"), dict(name="TRIGGERED_JOB", value="trunk-buildall") ], id="2013-12-27_00-09-37", changeSet=dict(items=[], kind="git"), ) import pyjq print(pyjq.first('$parameters[] | {"param_name": .name, "param_type": .type}', vars=data)) # returns Assertion failed: (JVP_HAS_KIND(key, JV_KIND_STRING)), function jv_object_set, file jv.c, line 1771.
But this works:
data = dict( parameters= [ dict(name="PKG_TAG_NAME", value="trunk"), dict(name="GIT_COMMIT", value="master"), dict(name="TRIGGERED_JOB", value="trunk-buildall") ], id="2013-12-27_00-09-37", changeSet=dict(items=[], kind="git"), ) import pyjq print(pyjq.first('.parameters as $parameters | $parameters[] | {"param_name": .name, "param_type": .type}', data)) # {'param_name': 'PKG_TAG_NAME', 'param_type': None}
Am I assuming something wrong regarding the use of vars?
I am using Python 3.11 and pyjq 2.6.0 in a Macbook M2.
Thank you in advance.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello.
I am having the following issue regarding the use of
vars
argument.This does not work:
But this works:
Am I assuming something wrong regarding the use of
vars
?I am using Python 3.11 and pyjq 2.6.0 in a Macbook M2.
Thank you in advance.
The text was updated successfully, but these errors were encountered: