JSFiddle - React, Tailwind, and code Playground

by javiros

HTML

<div ng-app ng-controller="MyCtrl">
  <table id="searchObjResults">
    <tr>
      <th>Name</th>
      <th>Agent Id</th>
    </tr>
    <tr ng-repeat="a in agent | filter: {status: {state: {code: filter.key}}}">
    {{a}}
      <td>{{a[0].applicationName}}</td>
      <td>{{a[0].agentId}}</td>
    </tr>
  </table>
</div>

JavaScript

function MyCtrl($scope, $timeout) {
  $scope.agent = {
    "0d297c1711de": [{
      "applicationName": "rewards-accounts",
      "agentId": "0d297c1711de",
      "status": {
        "agentId": "0d297c1711de",
        "eventTimestamp": 1510580172247,
        "state": {
          "code": 100,
          "desc": "Running"
        }
      }
    }],


    "16f279d66923": [{
      "applicationName": "rewards-accounts-details",
      "agentId": "16f279d66923",
      "status": {
        "agentId": "0d297c1711de",
        "eventTimestamp": 1510580172247,
        "state": {
          "code": 201,
          "desc": "Unexpected Shutdown"
        }
      }
    }],


    "203b353d32ef": [{
      "applicationName": "rewards-accounts-details",
      "agentId": "203b353d32ef",
      "status": {
        "agentId": "0d297c1711de",
        "eventTimestamp": 1510580172247,
        "state": {
          "code": 200,
          "desc": "Shutdown"
        }
      }
    }]
    }
  };