dataFilteringQryStr(filter, search) {
          let res = '';

          if (filter && Array.isArray(filter) && filter.length > 0 && filter[0]) {
            res = _.reduce(
              filter,
              (accum, val) => {
                if (val.operator && val.operator === 'eq') {
                  return `${accum}${accum ? '&' : ''}filter[where][${val.propertyKey}]=${val.value}`;
                }
                return accum;
              },
              ''
            );
          }

          // TODO: Strip unsafe characters from search before constructing qry str
          if (search && search.keys && search.keys.length > 0 && search.text) {
            res += _.reduce(search.keys, (accum, val) => `${accum}${res || accum ? '&' : ''}filter[where][${val}][like]=%25${search.text}%25`, '');
            // console.log(`PI: $api built qry str to search data in column(s) "${search.keys}"`);
          }

          return res;
        }
/**
         * Given an array of filter spec objects and a search spec object, return the LoopBack query string fragment for filtering/searching data during retrieval
         * @param {array} filter Array of objects of the form: { propertyKey: "", operator: "", value: any } used to build LoopBack [where] clause expressions to
         * include in resulting query string. Note that this routine only supports the equality operator ("eq") and ignores any object in the array having a different
         * operator
         * @param {object} [search={}] Optional object with search spec of the form: { keys: [], text: "" }, where keys are the property keys to search
         * for the given text. Note that this routine does NOT actually support more than one search key in the keys array due to a limitation in the
         * LoopBack "REST syntax" for filtering
         * @returns LoopBack query string fragment for filtering/searching a data endpoint
         */
Given an array of filter spec objects and a search spec object, return the LoopBack query string fragment for filtering/searching data during retrieval
@param {array} filter Array of objects of the form: { propertyKey: "", operator: "", value: any } used to build LoopBack [where] clause expressions to
include in resulting query string. Note that this routine only supports the equality operator ("eq") and ignores any object in the array having a different
operator
@param {object} [search={}] Optional object with search spec of the form: { keys: [], text: "" }, where keys are the property keys to search
for the given text. Note that this routine does NOT actually support more than one search key in the keys array due to a limitation in the
LoopBack "REST syntax" for filtering
@returns LoopBack query string fragment for filtering/searching a data endpoint
Given an array of filter spec objects and a search spec object return the LoopBack query string fragment for filtering / searching data during retrieval @param { array } filter Array of objects of the form : { propertyKey : " " operator : " " value : any } used to build LoopBack [ where ] clause expressions to include in resulting query string . Note that this routine only supports the equality operator ( " eq " ) and ignores any object in the array having a different operator @param { object } [ search = {} ] Optional object with search spec of the form : { keys : [] text : " " } where keys are the property keys to search for the given text . Note that this routine does NOT actually support more than one search key in the keys array due to a limitation in the LoopBack " REST syntax " for filtering @returns LoopBack query string fragment for filtering / searching a data endpoint
dataFilteringQryStr(filter, search) {
          let res = '';
          if (filter && Array.isArray(filter) && filter.length > 0 && filter[0]) {
            res = _.reduce(
              filter,
              (accum, val) => {
                if (val.operator && val.operator === 'eq') {
                  return `${accum}${accum ? '&' : ''}filter[where][${val.propertyKey}]=${val.value}`;
                }
                return accum;
              },
              ''
            );
          }
          if (search && search.keys && search.keys.length > 0 && search.text) {
            res += _.reduce(search.keys, (accum, val) => `${accum}${res || accum ? '&' : ''}filter[where][${val}][like]=%25${search.text}%25`, '');
          }
          return res;
        }
dataFilteringQryStr ( filter , search ) { let res = '' ; if ( filter && Array . isArray ( filter ) && filter . length > 0 && filter [ 0 ] ) { res = _ . reduce ( filter , ( accum , val ) => { if ( val . operator && val . operator === 'eq' ) { return ` ${ accum } ${ accum ? '&' : '' } ${ val . propertyKey } ${ val . value } ` ; } return accum ; } , '' ) ; } if ( search && search . keys && search . keys . length > 0 && search . text ) { res += _ . reduce ( search . keys , ( accum , val ) => ` ${ accum } ${ res || accum ? '&' : '' } ${ val } ${ search . text } ` , '' ) ; } return res ; }
Given an array of filter spec objects and a search spec object, return the LoopBack query string fragment for filtering/searching data during retrieval
 @param {array} filter Array of objects of the form: { propertyKey: "", operator: "", value: any } used to build LoopBack [where] clause expressions to
 include in resulting query string.
Given an array of filter spec objects and a search spec object return the LoopBack query string fragment for filtering / searching data during retrieval @param { array } filter Array of objects of the form : { propertyKey : " " operator : " " value : any } used to build LoopBack [ where ] clause expressions to include in resulting query string .
// TODO: Strip unsafe characters from search before constructing qry str // console.log(`PI: $api built qry str to search data in column(s) "${search.keys}"`);