Skip to Content
0
Jul 08, 2020 at 01:59 PM

Expand operation in OData

309 Views

Hi,

how can i filter the expanded collection in OData version 2.

i tried with below urls still it is not working.

http://localhost:31580/odata/UserInfo/Students?$expand=Projects($select=ProjectName)

http://localhost:31580/odata/UserInfo/Students?$expand=Projects($filter=ProjectName eq 'Science')

http://localhost:31580/odata/UserInfo/Students?$expand=Projects&$filter=Projects/ProjectName eq 'Science'

In the given example,

Students is the parent entity and Projects is the child/expanded entity. In the child entity, i have the ProjectName attribute for which the filter has to be applied. How can i achieve that?