def find_in_params(key, obj=params)
      if obj.respond_to?(:key?) && obj.key?(key)
        found = obj[key]

        if found.is_a?(Hash) && found.has_key?(:data)
          found[:data]
        else
          found
        end
      elsif obj.respond_to?(:each)
        r = nil
        obj.find{ |*a| r=find_in_params(key, a.last) }
        r
      end
    end
def find_in_params(key, obj=params)
      if obj.respond_to?(:key?) && obj.key?(key)
        found = obj[key]

        if found.is_a?(Hash) && found.has_key?(:data)
          found[:data]
        else
          found
        end
      elsif obj.respond_to?(:each)
        r = nil
        obj.find{ |*a| r=find_in_params(key, a.last) }
        r
      end
    end
Finds a key in a hash (defaults to using the controllers params hash).

 Params:
 +key+:: +Symbol+ A symbol representing the key you'd like to find.
 +obj+:: +Hash+ An object to serach for the key within.