vm.owners = parents.children.map(function(e) {
  getparentById(e.Id)
    .then(function(getresponse) {
      var html = '<a href="/#/parent/onboard/' + e.Id + '"  target="_blank">' + e.Number + "-" + e.Name + "-" + getresponse.code + '</a>';
      return html;
    })
    .finally(function() {
      vm.isLoading = false;
    });
  // var html = '<a href="/#/parent/onboard/'+e.Id+'"  target="_blank">' + e.Number + "-" + e.Name + '</a>';
  // return html;
}).join('  ||  ');
Above code i am trying join html variable by || as it loops through children and calls an api through getparentbyid. if i put html outside getparentbyid function i can join html with '||' but i can't get code of getresponse to join with it. when i put it inside getparentbyid api call function i can't get output jouned with "||". i just get empty spaces joined by "||". how do i solve this?
 
    