AngularJS forEach() Function using an Object Array - Demo

Here's an object named employees with a random array of data, starting with a Date (or Date of Joining), employee name and age. The key is the Date.

angularjs example

 $form.employees = {
    '05/17/2015': { 'name': 'Alpha', 'age': 37 },
    '06/25/2016': { 'name': 'Bravo', 'age': 27 },
    '09/11/2016': { 'name': 'Charlie', 'age': 29 },
    '01/17/2017': { 'name': 'Delta', 'age': 19 },
    '03/09/2014': { 'name': 'Echo', 'age': 32 }
}

Clicking the submit button (below) will loop through each object value and show all the values. However, if you choose the option Show (Date of Joining >= 01/05/2016, it will show selected values extracted from the object "employees".

{{ myAccess.name }}

{{ emp }}

Go back to the Tutorial
More interesting and interactive Demos