Skip to content
Advertisement

How to filter expanded datasets in json URL?

I am trying to filter results in my json URL’s expanded dataset. I can filter the regular data just fine but I am having issues reaching the expanded data which is being returned as a nested array (I believe).

For example I use this url to filter and only display the city Austin:

JavaScript

I am able to expand this dataset and include open house information so the URL looks like this:

JavaScript

I’d like to know how I can filter by a value in the expanded section. So instead of filtering by City I would filter by OpenHouseStatus = Active (see json example below).

The structure of the json results look like this:

JavaScript

Advertisement

Answer

The way I resolved this issue was by doing the following:

https://api.bridgedataoutput.com/api/v2/OData/actris/Property?access_token=HIDDEN&$expand=OpenHouses($filter=OpenHouseStatus%20eq%20%27Active%27)

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement