I am attempting to display each item in an array that is a part of an object's property:
{
position: "Finance Office Assistant",
employer: "Washtenaw County Finance Department",
location: "Ann Arbor, MI",
start_date: "2012",
current: false,
end_date: "2012",
duties: [
"Item 1",
"Item 2",
"Item 3"
]
},
This specific object is within an array along with multiple other objects. My goal is to develop a function that iterates through all the objects and displays the duties array items in an unordered list with matching numbers of list items and array items.
Below is the function I am working on to accomplish this task:
$scope.dutyList = function() {
var arrayLength = $scope.duties.length;
while (arrayLength > 0) {
console.log("dutyList run")
document.write("<li> {{ dutyList }} </li>");
--arrayLength;
}
}