def symbolize_keys keys, hash
      new_hash = {}
      keys.each do |key|
        if hash[key].kind_of? Hash
          new_hash[key.to_sym] = symbolize_keys(hash[key].keys, hash[key])
        elsif hash[key].kind_of? Array
          new_hash[key.to_sym] = []
          hash[key].each do |item|
            if item.kind_of? Hash
              new_hash[key.to_sym] << symbolize_keys(item.keys, item)
            else
              new_hash[key.to_sym] << item
            end
          end
        else
          new_hash[key.to_sym] = hash[key]
        end
      end

      return new_hash
    end
def symbolize_keys keys, hash
      new_hash = {}
      keys.each do |key|
        if hash[key].kind_of? Hash
          new_hash[key.to_sym] = symbolize_keys(hash[key].keys, hash[key])
        elsif hash[key].kind_of? Array
          new_hash[key.to_sym] = []
          hash[key].each do |item|
            if item.kind_of? Hash
              new_hash[key.to_sym] << symbolize_keys(item.keys, item)
            else
              new_hash[key.to_sym] << item
            end
          end
        else
          new_hash[key.to_sym] = hash[key]
        end
      end

      return new_hash
    end
Creates a new hash with all keys as symbols, can be
 any level of depth