const { string } = require('vue-types');

const handleFindObjectArrayItem = (
  array: Array<Object>,
  key: string,
  val: string,
): Object | null => {
  let obj: Object | null = null;
  for (let i: number = 0; i < array.length; i++) {
    if (array[i][key] == val) {
      obj = array[i];
      break;
    }
  }
  return obj;
};
