code: function filter(store, keyObj) {
        var size = 0;
        var data = store.data.asObject();
        var filteredData = {};
        var isArray = store.data.__sorted;
        var validItem;
  
        // If no key is specified retrieve root data
        if (keyObj && keyObj.constructor === Object) {
          if (isArray) {
            data = store.data.asArray();
            filteredData = [];
  
            for (var i = 0; i < data.length; i++) {
              validItem = true;
              // Loop through filter fields keys
              for (var key in keyObj) {
                // Data has the specified filter property
                if (data[i][key] !== keyObj[key]) {
                  // Discard item from data
                  validItem = false;
                  break;
                }
              }
              // Add item to filtered data
              if (validItem) {
                filteredData.push(data[i]);
              }
            }
          } else {
            // Loop through store data
            for (var index in data) {
              validItem = true;
              // Loop through filter fields keys
              for (var key in keyObj) {
                // Data has the specified filter property
                if (data[index][key] !== keyObj[key]) {
                  // Discard item from data
                  validItem = false;
                  break;
                }
              }
              // Add item to filtered data
              if (validItem) {
                filteredData[index] = data[index];
              }
            }
          }
  
          // Update store data object
          store.data = new Result(filteredData, store, store.data.__sorted);
        } 
        // Update store data items length
        store.size = Object.keys(filteredData).length;
      }
docs: /*
  @function filter
  @description Filter store data
  @param {Object} store [Store element]
  @param {Object} keyObj [Filter keys]