Hi,
I would like to present the following problem I am having with the OData filter option.
Any ideas on how to solve this problem would be highly appreciated.
My goal is to parse JSON format and return only the value
“WorkstationId”: “8E5B3291-E092-4091-8C9A-58B7C90E907C”,
I have created the following request but it generates the following error message; https://doesnotexist/MyApi/api/v1.0/locations?$expand=Workstations,AccessDomains,DefaultProfiles&$filter=Workstations/WorkstationName eq ‘LP08’
“error”: { “code”: “”, “message”: “The query specified in the URI is not valid. The parent value for a property access of a property ‘WorkstationName’ is not a single value. Property access can only be applied to a single value.”,
Error is caused by my filter option:
filter=Workstations/WorkstationName eq ‘LP08’
My JSON file;
"@odata.context": "https://doesnotexist/MyApi/api/v1.0/$metadata#locations",
"value": [
{
"LocationIdInternal": 1,
"LocationId": "B9507A00-9057-4CCC-A66B-9AAAB1B6CA5B",
"DisplayName": "DEFAULT_LOCATION",
"IsActive": true,
"Workstations": [
{
"WorkstationIdInternal": 1,
"WorkstationId": "E4FC58FB-7989-4C87-9216-0A3B9F52860E",
"WorkstationName": "EX08",
"WorkstationType": "Default"
},
{
"WorkstationIdInternal": 2,
"WorkstationId": "8E6DB912-F74F-444C-98D6-179747BBDE1A",
"WorkstationName": "LP08",
"WorkstationType": "Default"
},
{
"WorkstationIdInternal": 3,
"WorkstationId": "8E5B3291-E092-4091-8C9A-58B7C90E907C",
"WorkstationName": "OVER77",
"WorkstationType": "Default"
}
]
}
]
}