ads_common/lib/ads_common/results_extractor.rb
def check_key_value_struct(data)
      if data.kind_of?(Hash)
        return check_key_value_hash(data)
      end
      if data.kind_of?(Array) && !data.empty?
        data.each do |item|
          return false if !check_key_value_hash(item)
        end
        return true
      end
      return false
    end
def check_key_value_struct(data)
      if data.kind_of?(Hash)
        return check_key_value_hash(data)
      end
      if data.kind_of?(Array) && !data.empty?
        data.each do |item|
          return false if !check_key_value_hash(item)
        end
        return true
      end
      return false
    end
Checks if all elements of the array or hash passed are hashes and have
 ':key' and ':value' keys only.