title: Printing ParenctChildren Hierarchy using Kncokout
body: <p>Need help in printing data in form of parent children hierarchy.</p>
  
  <pre><code>&lt;!--Parent Modal---&gt;
  function serviceList(serviceName,serviceDuration,serviceDefaultCost,serviceId,serviceTaskList)
  {
      this.serviceName=ko.observable(serviceName);
      this.serviceDuration=ko.observable(serviceDuration);
      this.serviceDefaultCost=ko.observable(serviceDefaultCost);
      this.serviceId=ko.observable(serviceId);
      this.serviceTaskList=ko.utils.arrayMap(serviceTaskList,function(item){
          return new servicesTaskList(item.serviceTaskId,item.skillId,item.skillName,item.boothType,item.facilityId,item.facilityName,item.serviceName,item.serviceTaskDuration,item.serviceTaskOrder,item.serviceTaskName,item.deleteFlag);
      });
  }
  
  &lt;!--Children Modal---&gt;
  function servicesTaskList(serviceTaskId,skillId,skillName,boothType,facilityId,facilityName,serviceName,serviceTaskDuration,serviceTaskOrder,serviceTaskName,deleteFlag)
  {
      this.serviceTaskId= ko.observable(serviceTaskId);
      this.skillId= ko.observable(skillId);
      this.skillName= ko.observable(skillName);
      this.boothType= ko.observable(skillName);
      this.facilityId= ko.observable(facilityId);
      this.facilityName= ko.observable(facilityName);
      this.serviceName= ko.observable(serviceName);
      this.serviceTaskDuration= ko.observable(serviceTaskDuration);
      this.serviceTaskOrder= ko.observable(serviceTaskOrder);
      this.serviceTaskName= ko.observable(serviceTaskName);
      this.deleteFlag= ko.observable(deleteFlag);
  
  }
  </code></pre>
  
  <p>serviceTaskList is an other modal that consists of child data after every parent iteration Neeed to print children then again parent and its children and so on..</p>
  
  <ul>
  <li>serviceName1  serviceDuration1 serviceDefaultCost1 serviceId1 serviceTaskList1
  <ul>
  <li>skillId1 skillName boothType facilityId facilityName serviceTaskDuration</li></li>
  <li>skillId2 skillName boothType facilityId facilityName serviceTaskDuration</li></li>
  <li>skillId3 skillName boothType facilityId facilityName serviceTaskDuration</li></li>
  </ul></li>
  <li>serviceName2  serviceDuration2 serviceDefaultCost2 serviceId2 serviceTaskList2
  <ul>
  <li>skillId1 skillName boothType facilityId facilityName serviceTaskDuration</li></li>
  <li>skillId2 skillName boothType facilityId facilityName serviceTaskDuration</li></li>
  <li>skillId3 skillName boothType facilityId facilityName serviceTaskDuration</li></li>
  </ul></li>
  </ul>
  
  <p>Please anyone help me your help is greatly appreciated.</p>