How to prefield multiple checkbox based on databse value

I have one array that contain all the office list. another array is user selected list. so now I want to display all officelist and if the value in selected list is the same with office list then the checkbox will be checked

this.officeLIST = [
  { "office_id": "1", "officename": "Sun Dept" },
  { "office_id": "2", "officename": "Moon" },
  { "office_id": "3", "officename": "Stars" }

Selected list array

"office": [
      "office_id": "1",
      "officename": "Sun Dept"
      "office_id": "2",
      "officename": "Moon Dept"

Thank you.

You will ngfor the first array to display the data right?

No. actually i create a new array like array like this


    for (var i = 0; i < this.getSize.length; i++) {

      var ismatch = false; // we haven't found it yet

      for (var j = 0; j < this.pro_size_list.length; j++) {

        if (this.[i].size_id == this.pro_size_list[j].product_size) {

          ismatch = true;

          this.getSize[i].checked = true;//  checkbox status true



        }//End if



      if (!ismatch) {

        this.getSize[i].checked = false;//  checkbox status false


      } //End if




This is my html

<div class="form-group">

          <ion-label for="brname" class="wizard-form-text-label" position="stacked" >Select Size*</ion-label>

          <ion-select interface="popover" multiple="true" cancelText="Nah" okText="Okay!" class="form-control">

            <ion-select-option *ngFor="let item of newArray" checked="true" value="{{item.size_id}}">{{item.size}}</ion-select-option>



Please can you tell me there have any checked properties of ion-select?