Hi ,
I have Employee Datasource as below
var obj = [
{
"Id": "1",
"Name": "Ambica",
"addresses": [
{
"City": "Bangalore",
"State": "Karnataka"
},
{
"City": "Mysore",
"State": "Karnataka"
}
]
},
{
"Id": "2",
"Name": "Manu",
"addresses": [
{
"City": "Bangalore",
"State": "Karnataka"
},
{
"City": "Mysore",
"State": "Karnataka"
}
]
}
];
var EmployeeDS = new kendo.data.DataSource({
data: obj
});
here my requirement is get employee record whose name is "Ambica" and city is "bangalore".
so how can i filter my EmployeeDS??
Have written filter as below but its not filtering (Only one level is filtering)
EmployeeDS.filter([{
"logic": "and",
filters: [{ field: "Name", operator: "contains", value: "Ambica" },
{ field: "addresses.City", operator: "equal", value: "Bangalore" }
]
}]);
I have Employee Datasource as below
var obj = [
{
"Id": "1",
"Name": "Ambica",
"addresses": [
{
"City": "Bangalore",
"State": "Karnataka"
},
{
"City": "Mysore",
"State": "Karnataka"
}
]
},
{
"Id": "2",
"Name": "Manu",
"addresses": [
{
"City": "Bangalore",
"State": "Karnataka"
},
{
"City": "Mysore",
"State": "Karnataka"
}
]
}
];
var EmployeeDS = new kendo.data.DataSource({
data: obj
});
here my requirement is get employee record whose name is "Ambica" and city is "bangalore".
so how can i filter my EmployeeDS??
Have written filter as below but its not filtering (Only one level is filtering)
EmployeeDS.filter([{
"logic": "and",
filters: [{ field: "Name", operator: "contains", value: "Ambica" },
{ field: "addresses.City", operator: "equal", value: "Bangalore" }
]
}]);