I have data "like" this:
$scope.persons = {
"ID123": {
name_de: "Andre",
name_en: "Anrew",
age: 30,
description: "He is the father of xyz and . . .",
. . .
},
"IDabc": {
name_de: "Markus",
name_en: "Mark",
age: 20,
. . .
},
"IDxyz": {
name_de: "Isaak",
name_en: "Isaac",
age: 23,
. . .
}
. . .
}
and i have an input/ng-repeat:
<input ng-model="query" placeholder="Suche . . .">
<ul>
<li ng-repeat="p in persons | orderBy:'name_de' | filter:query"> Some output here . . . </li>
</ul>
Now is the question how can i order and filter this?
It worked with an Array of persons, but i need the "ID's" so the object is necessary!?
I am looking also for a way to filter the object by N-properties e.g for name_de AND name_en (so it will show ID123 if i search for Andre and also if i search for Andrew) BUT ignoring the text of "description" (first i had the problem that the filter checks ALL properties)