2023 Oct 15 7:00 PM
Hello All,
I am trying to do the following Query -
https://services.odata.org/V4/TripPinService/People('russellwhyte')/AddressInfo
The below query returns a correct response like below -
Now I am trying to read the property - "City" which is a complexType using the query - https://services.odata.org/V4/TripPinService/People('russellwhyte')/AddressInfo/City.
The result is an internal server error -
How do I read it correctly? Thank you.
Best Regards,
Tanmoy
2023 Oct 15 9:14 PM
Note that the "value" in the first response is an array of addresses (and the second, error, response indicates that the AddressInfo is a collection of complex types, not a single complex type instance).
If you request "AddressInfo/City" it's a bit like asking "what is the surname of all the people in the neighboring town".
The answer would either be "ambiguous" (or perhaps "none" if there are no people in the neighboring town) or it would be an array of surnames.
In any case, my advice would be to just fetch the https://services.odata.org/V4/TripPinService/People('russellwhyte') and have your own client program extract form that the info that you want, whether it is the City from the first address, the City from the last address, all the cities, or some other info.