I have an array that is not defined and my drop down is breaking however if I console.log the array I can see the values.
Here is my ts code
This fires onInit
rolesArr: SelectItem[];
let obj = {  1: "System Admin",  2: "Internal Account Manager",  3: "CAT Manager",
4: "HR Admin",  5: "HR Manager",  6: "HR Recruiter",  7: "Candidate",
8: "Operations administrator"},
result = Object.entries(obj).reduce((a, [label, value]) => 
a.concat({label, value}), []);
    this.rolesArr.push(...result);
Here is my HTML
<div class="ui-g-6 ui-sm-12">
  <div class="input-container">
    <label for="role">Role*</label>
    <p-dropdown [options]="rolesArr"
        formControlName="role" id="role" placeholder="Please select">
    </p-dropdown>
  </div>
</div>

