Q:

filter json array and show data in 2 tables depending on array item using angularjs

So i have some json data like this:
{
  "id": 2,
  "itemList": [
    {
      "id": 7,
      "name": "xx",
      "extraInfo": "45",
      "tax": 21.00,
      "price": null,
      "oneTimeItem": false,
      "fkIdUserItem": 2,
      "purchasePrice": 45.00,
      "priceWorkhour": 43.00,
      "isItemWorkhour": true,
      "quantity": 45,
      "quantityKeepTrack": true,
      "vat": 21.00
    },
    {
      "id": 8,
      "name": "5",
      "extraInfo": "454",
      "tax": 0.10,
      "price": 10.11,
      "oneTimeItem": false,
      "fkIdUserItem": 2,
      "purchasePrice": 0.16,
      "priceWorkhour": 6.00,
      "isItemWorkhour": false,
      "quantity": 1,
      "quantityKeepTrack": true,
      "vat": 0.10
    },
    {
      "id": 9,
      "name": "Kussen",
      "extraInfo": null,
      "tax": 21.00,
      "price": 20.00,
      "oneTimeItem": false,
      "fkIdUserItem": 2,
      "purchasePrice": 15.00,
      "priceWorkhour": 45.20,
      "isItemWorkhour": false,
      "quantity": 100,
      "quantityKeepTrack": true,
      "vat": 21.00
    },
    {
      "id": 10,
      "name": "45",
      "extraInfo": "45",
      "tax": 4.00,
      "price": 45.00,
      "oneTimeItem": false,
      "fkIdUserItem": 2,
      "purchasePrice": 0.00,
      "priceWorkhour": null,
      "isItemWorkhour": false,
      "quantity": null,
      "quantityKeepTrack": false,
      "vat": 4.00
    }
  ],
  "email": "2@2",
  "password": null,
  "lastName": "2",
  "firstName": "2",
  "authority": "USER_ROLE",
  "enabled": true
}

But now i want to sort the data if for example the price is not equals to null the data is shown in table 1 else the data is shown in table 2.
I have stored the list in the localstorage but can't find any good examples how i could proceed with this.
Now the data is saved to the table like this 
    self.tableParams = new NgTableParams({}, {
        filterDelay: 0,
        data: $localStorage.itemArray
    });

But i want to add filter depending on the status of price. Any idea's

A:

If you just want to filter NULL / NOT NULL you can use this synthax :
//return all non-null objects becuse !!(null) === Not(Not(false)) === false
<div ng-repeat="item in data.itemList | filter:{ price: '!'}">
//return all null objects becuse !(null) === Not(false) === true
<div ng-repeat="item in data.itemList | filter:{ price: '!!'}">

var app = angular.module('App', []);
app.controller('Ctrl', function($scope) {
  $scope.data = {
    "id": 2,
    "itemList": [{
      "id": 7,
      "name": "xx",
      "extraInfo": "45",
      "tax": 21.00,
      "price": null,
      "oneTimeItem": false,
      "fkIdUserItem": 2,
      "purchasePrice": 45.00,
      "priceWorkhour": 43.00,
      "isItemWorkhour": true,
      "quantity": 45,
      "quantityKeepTrack": true,
      "vat": 21.00
    }, {
      "id": 8,
      "name": "5",
      "extraInfo": "454",
      "tax": 0.10,
      "price": 10.11,
      "oneTimeItem": false,
      "fkIdUserItem": 2,
      "purchasePrice": 0.16,
      "priceWorkhour": 6.00,
      "isItemWorkhour": false,
      "quantity": 1,
      "quantityKeepTrack": true,
      "vat": 0.10
    }, {
      "id": 9,
      "name": "Kussen",
      "extraInfo": null,
      "tax": 21.00,
      "price": 20.00,
      "oneTimeItem": false,
      "fkIdUserItem": 2,
      "purchasePrice": 15.00,
      "priceWorkhour": 45.20,
      "isItemWorkhour": false,
      "quantity": 100,
      "quantityKeepTrack": true,
      "vat": 21.00
    }, {
      "id": 10,
      "name": "45",
      "extraInfo": "45",
      "tax": 4.00,
      "price": 45.00,
      "oneTimeItem": false,
      "fkIdUserItem": 2,
      "purchasePrice": 0.00,
      "priceWorkhour": null,
      "isItemWorkhour": false,
      "quantity": null,
      "quantityKeepTrack": false,
      "vat": 4.00
    }],
    "email": "2@2",
    "password": null,
    "lastName": "2",
    "firstName": "2",
    "authority": "USER_ROLE",
    "enabled": true
  };
});
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script>

<body ng-app="App" ng-controller="Ctrl">
  NOT NULL
  <div ng-repeat="item in data.itemList | filter:{ price: '!!'}">
    {{item.id}}
  </div>
   NULL
  <div ng-repeat="item in data.itemList | filter:{ price: '!'}">
    {{item.id}}
  </div>
</body>

