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

is it possible to filter NULLs? #9

Open
arenas-guerrero-julian opened this issue Oct 28, 2021 · 0 comments
Open

is it possible to filter NULLs? #9

arenas-guerrero-julian opened this issue Oct 28, 2021 · 0 comments

Comments

@arenas-guerrero-julian
Copy link

arenas-guerrero-julian commented Oct 28, 2021

Hi,

I have the following JSON:

[{
    "author": [
        {
            "fullname": "some fullname",
            "rank": 3
        },
        {
            "fullname": "other fullname",
            "pid": {
                "id": {
                    "scheme": "orcid",
                    "value": "0000-0000-0000-0000"
                },
                "provenance": {
                    "provenance": "Harvested",
                    "trust": "0.91"
                }
            },
            "rank": 4
        }
    ]
}]

and the following jsonpath expression:
$.*.author[*].(fullname,pid.id.value,pid.id.scheme)

I am getting the following result:
[{'fullname': 'some fullname', 'pid.id.value': None, 'pid.id.scheme': None}, {'fullname': 'other fullname', 'pid.id.value': '0000-0000-0000-0000', 'pid.id.scheme': 'orcid'}]

I am getting None values, is there a way to filter them?

Thank you in advance!

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

No branches or pull requests

1 participant