def data_filter(data, filters)
      filters.split(',').each do |filter|
        field = filter.split(':').first.strip.downcase
        search = filter.split(':').last.strip
        if search =~ /^\/.*\/?/
          data = data.find_all { |k| k["#{field}"].to_s =~ search.to_regexp } if field && search
        else
          data = data.find_all { |k| k["#{field}"].to_s == "#{search}" } if field && search
        end
      end
      data
    end
def data_filter(data, filters)
      filters.split(',').each do |filter|
        field = filter.split(':').first.strip.downcase
        search = filter.split(':').last.strip
        if search =~ /^\/.*\/?/
          data = data.find_all { |k| k["#{field}"].to_s =~ search.to_regexp } if field && search
        else
          data = data.find_all { |k| k["#{field}"].to_s == "#{search}" } if field && search
        end
      end
      data
    end
Filter data on regex or just on string