Hi Martin,
Thanks for your reply. It is really helpful. I have now changed my schema and using a single content type as you suggested. I am now able to access all the required data in single object.
But I am getting some difficulties in filtering on the relational fields. So for example, I am now getting Request and offers data in single object and the data for 'Request' type is like this,
[{
"Offers":[{
"deadline":"2016-07-21T06:20:23.138Z",
"amount":"25",
"CreatedAt":"2016-07-20T12:06:43.684Z",
"ModifiedAt":"2016-07-20T12:06:43.684Z",
"CreatedBy":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ModifiedBy":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
}],
"active":true,
"status":"Open",
"CreatedAt":"2016-07-19T06:20:58.498Z",
"ModifiedAt":"2016-07-21T10:23:49.373Z",
"CreatedBy":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ModifiedBy":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"hasOffers":true,
"Id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}]
I am trying to filter this data based on Offers.CreatedBy, Basically it should return me only those 'Requests' that has offers CreatedBy the user.
Is it possible using kendo datasource? I have tried normal approach
dataSource.filter({ field: 'Offers.CreatedBy', operator: 'eq', value: localStorage.getItem('userId') });
but it is not working for the array fields or relational fields.
Please help me.
Thanks,
Rupesh