I have a dataframe like below.
ID, details_Json
1 {"name":"Anne","Age":"12","country":"Denmark"}
2 {"name":"Zen","Age":"24"}
3 {"name":"Fred","Age":"20","country":"France"}
4 {"name":"Mona","Age":"18","country":"Denmark"}
As you can see fields in the json are not fixed. It can be include more than given fields. I mean sometimes name, Age, country
and another time it can be something like name, Age, country, University
or name, Age, university
I want to filter rows which are include country
in its json and country is equal to Denmark.
My output should be look like below.
ID, details_Json
1 {"name":"Anne","Age":"12","country":"Denmark"}
4 {"name":"Mona","Age":"18","country":"Denmark"}
Is there any way to do that?
Thank you:)