def indifferent!(hash)
      unless hash.is_a?(Hash)
        return
      end

      #set the default proc to allow the key to be either string or symbol if a matching key is found.
      hash.default_proc = proc do |h, k|
        if h.key?(k.to_s)
          h[k.to_s]
        elsif h.key?(k.to_sym)
          h[k.to_sym]
        else
          nil
        end
      end

      #recursively process any child hashes
      hash.each do |key,value|
        if hash[key] != nil
          if hash[key].is_a?(Hash)
            indifferent!(hash[key])
          elsif hash[key].is_a?(Array)
            indifferent_array!(hash[key])
          end
        end
      end

      hash
    end
def indifferent!(hash)
      unless hash.is_a?(Hash)
        return
      end

      #set the default proc to allow the key to be either string or symbol if a matching key is found.
      hash.default_proc = proc do |h, k|
        if h.key?(k.to_s)
          h[k.to_s]
        elsif h.key?(k.to_sym)
          h[k.to_sym]
        else
          nil
        end
      end

      #recursively process any child hashes
      hash.each do |key,value|
        if hash[key] != nil
          if hash[key].is_a?(Hash)
            indifferent!(hash[key])
          elsif hash[key].is_a?(Array)
            indifferent_array!(hash[key])
          end
        end
      end

      hash
    end
This method is called to make a hash allow indifferent access (it will accept both strings & symbols for a valid key).