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
Map Operator
Reference: https://github.com/kdl-org/kdl/blob/1.0.0/QUERY-SPEC.md#map-operator
Modified from QUERY-SPEC.md)
$ cat example.kdl package { name "foo" version "1.0.0" dependencies platform="windows" { winapi "1.0.0" path="./crates/my-winapi-fork" } dependencies { miette "2.0.0" dev=true } } $ cat example.kdl | kq "package name => val()" ["foo"] $ cat example.kdl | kq "dependencies[platform] => platform" ["windows"] $ cat example.kdl | kq "dependencies > [] => (name(), val(), path)" [("winapi", "1.0.0", "./crates/my-winapi-fork"), ("miette", "2.0.0", None)] $ cat example.kdl | kq "dependencies > [] => (name(), values(), props())" [("winapi", ["1.0.0"], {"platform": "windows"}), ("miette", ["2.0.0"], {"dev": true})]
The text was updated successfully, but these errors were encountered:
FYI the map operator is going away completely with the next KQL spec, but you might want to come up with something that replaces it?
Sorry, something went wrong.
No branches or pull requests
Reference: https://github.com/kdl-org/kdl/blob/1.0.0/QUERY-SPEC.md#map-operator
The text was updated successfully, but these errors were encountered: