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
Implements a simple and easy for usage syntax for object conversion.
assert parse("${a:b, b:a}") \ .find({"a": 1, "b": 2}) == [{"b": 1, "a": 2}], "swaps values between a and b" assert parse("${username:author_name, age:author_age}") \ .find({ "author_name": "Jade", "author_age": 18, "boo": "boo" }) == [{"username": "Jade", "age": 18}], "Rearranges the key-value pairs"
assert parse("$[{a:b}]").find([{"b": 1}, {"c": 1}]) == [{"a": 1}, {"a": None}] assert parse("$[{a:b}][a != null]").find([{"b": 1}, {"c": 1}]) == [{"a": 1}]
assert parse("${author: {name: author_name}}") \ .find({"author_name": "Jade"}) == [{"author": {"name": "Jade"}}]
Or the key of the key-value pair may be chained path which components are name only, e.g. boo.bar
assert parse("${author.name: author_name}") \ .find({"author_name": "Jade"}) == [{"author": {"name": "Jade"}}]
assert parse("${name: author.name}") \ .find({"author": {"name": "Jade"}}) == [{"name": "Jade"}]
The text was updated successfully, but these errors were encountered:
linw1995
No branches or pull requests
Implements a simple and easy for usage syntax for object conversion.
Functions
Common Conversion
Conversion Can Be Applied To Array
Nested Conversion
Or the key of the key-value pair may be chained path which components are name only, e.g. boo.bar
The Value Of The Key-Value Pair May Be An Expression
WIP Update key-value pairs
The text was updated successfully, but these errors were encountered: