12-27-2023 12:22 PM
Hello everyone. I have this json object
"wd:Academic_Period": {
"@wd:Descriptor": "Summer 2021 (05/24/2021-08/07/2021)",
"wd:ID": [
{
"@wd:type": "WID",
"$": "d75e5035f5431001cbdce27c57290002"
},
{
"@wd:type": "Academic_Period_ID",
"$": "ACADEMIC_PERIOD_SUMMER_2021"
}
]
}
I want the element from the "wd:ID" array where the type is "WID".
I have tried this expression: jsonPath($, "['wd:Academic_Period']['wd:ID'][?(['@wd:type'] == 'WID')]") and many other variants but I cannot express what is needed. This particular expresion returns a blank value.
How should I refer to @wd:type in this expression?
Solved! Go to Solution.
12-28-2023 01:07 AM
Try with this expression:
jsonPath($, "['wd:Academic_Period']['wd:ID'][?(@['@wd:type'] == 'WID')]")
12-28-2023 01:07 AM
Try with this expression:
jsonPath($, "['wd:Academic_Period']['wd:ID'][?(@['@wd:type'] == 'WID')]")