Skip to content
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

Multiple conditions in queries #8

Open
rignatev opened this issue Apr 5, 2020 · 2 comments
Open

Multiple conditions in queries #8

rignatev opened this issue Apr 5, 2020 · 2 comments
Assignees
Labels

Comments

@rignatev
Copy link

rignatev commented Apr 5, 2020

Hello!
First of all, thanks for this project.

Could you please add conditions operators AND, OR for using multiple conditions in one query?

For example:

let json_string = r#"
{
    "customFields": [
        {
            "projectCustomField": {
                "id": "1",
                "$type": "EnumProjectCustomField"
            },
            "value": {
                "localizedName": null,
                "description": null,
                "name": "High",
                "id": "3",
                "$type": "EnumBundleElement"
            },
            "name": "Priority",
            "id": "1",
            "$type": "SingleEnumIssueCustomField"
        },
        {
            "projectCustomField": {
                "id": "2",
                "$type": "EnumProjectCustomField"
            },
            "value": {
                "localizedName": null,
                "description": null,
                "name": "Bug",
                "id": "3",
                "$type": "EnumBundleElement"
            },
            "name": "Type",
            "id": "2",
            "$type": "SingleEnumIssueCustomField"
        },
    ]
}"#;

let prioroty= ajson::get(json_string, r#"customFields.#($type == "SingleEnumIssueCustomField" && name == "Priority").value.name"#).map(|s| s.to_string());
@importcjj
Copy link
Owner

Sorry for late. It looks like a good feature, but I have no time to implement it at this time cause of my work.

@importcjj importcjj added the Todo label Apr 10, 2020
@importcjj importcjj self-assigned this Apr 10, 2020
@importcjj
Copy link
Owner

And I will do it as soon as I finished my work in hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants