I have a JSON array like this ...
[
{
"Event_code": "AB-001",
"Interest_area": "Arts and Education",
"Start_time": "9:00 AM",
"End_time": "3:00 PM",
"Session_type": "Course information session"
},
{
"Event_code": "AB-002",
"Interest_area": "Arts and Education",
"Start_time": "12:30 PM",
"End_time": "1:00 PM",
"Session_type": "Course information session"
},
{
"Event_code": "AB-003",
"Interest_area": "",
"Start_time": "9:00 AM",
"End_time": "3:00 PM",
"Session_type": "Course information session"
},
{
"Event_code": "AB-004",
"Interest_area": "Business",
"Start_time": "10:30 AM",
"End_time": "11:00 AM",
"Session_type": "Course information session"
},
{
"Event_code": "AB-005",
"Interest_area": "General Interest",
"Start_time": "9:30 AM",
"End_time": "1:30 PM",
"Session_type": "Experience"
},
{
"Event_code": "AB-006",
"Interest_area": "Environment, Business",
"Start_time": "11:00 AM",
"End_time": "11:30 AM",
"Session_type": "Course information session"
},
{
"Event_code": "AB-014",
"Interest_area": "Health sciences and allied health, Medicine",
"Start_time": "1:00 PM",
"End_time": "2:00 PM",
"Session_type": "Course information session"
}
]
What I want to do is filter this JSON and extract unique "Interest_area" values where "Session_type" is equal to "Course information session" ...
My expected output is
["Arts and Education","Business","Environment"]
I have seen this solution, which is pretty close to what I am looking for, but it does not work in my case as my JSON may have "2 or more" values for the "Interest Area" field.