JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app ng-controller="ShowHide" ng-init="parents=[{
      &#34;father&#34;:&#34;John&#34;,
      &#34;mother&#34;:&#34;Mary&#34;,
      &#34;kids&#34;:[{
        &#34;name&#34;:&#34;Tom&#34;},
        {&#34;name&#34;:&#34;Jenny&#34;}]
      },{
      &#34;father&#34;:&#34;Robert&#34;,
      &#34;mother&#34;:&#34;Jane&#34;,
      &#34;kids&#34;:[
        {&#34;name&#34;:&#34;Tina&#34;},
        {&#34;name&#34;:&#34;Harry&#34;}
      ]
      }];">
  <ul ng-repeat="parent in parents">
    <li>Mother: <i>{{parent.mother}}</i></li>
    <li>Father: <i>{{parent.father}}</i></li>
    <a href="#" ng-click="showKids()">Show Kids</a>
    <ul ng-repeat="kid in parent.kids" ng-show="active">
      <li>{{kid.name}}</li>
    </ul>
  </ul>
</div>

JavaScript

function ShowHide($scope) {
  $scope.active = false
        
  $scope.showKids = function() {
    if ($scope.active == false) {
        $scope.active=true
    }
    else {
      $scope.active=false
    }
  }
}