Returns all document data as a nested Hash
979079
def to_hash
      {
        'url'              => url,
        'scheme'           => scheme,
        'host'             => host,
        'root_url'         => root_url,
        'title'            => title,
        'best_title'       => best_title,
        'author'           => author,
        'best_author'      => best_author,
        'description'      => description,
        'best_description' => best_description,
        'links'            => links.to_hash,
        'images'           => images.to_a,
        'charset'          => charset,
        'feed'             => feed,
        'content_type'     => content_type,
        'meta_tags'        => meta_tags,
        'favicon'          => images.favicon,
        'response'         => { 'status'  => response.status,
                                'headers' => response.headers }
      }
    end
784362
function serializeHash() {
      var hash = {}
      eachFormElement.apply(function (name, value) {
        if (name in hash) {
          hash[name] && !isArray(hash[name]) && (hash[name] = [hash[name]])
          hash[name].push(value)
        } else hash[name] = value
      }, arguments)
      return hash
    }
496785
def to_hash
      keys = table_header_keys
      values = self
      hash = {}
      keys.each_with_index {|k,i| hash[k]=values[i]}
      return hash
    end
614320
def result_to_hash(result)
      result.children.inject({}) do |hash, node|
        hash[node.name] = node.text
        hash[node.name] = node.text.to_i if node.text && node.text =~ /^\d+$/
        hash
      end
    end
770405
def to_hash
      index_hash = Hash.new
      index_hash["json_claz"] = self.class.name
      index_hash["id"] = id
      index_hash["name"] = name
      index_hash["accounts_id"] = accounts_id
      index_hash["related_orgs"] = related_orgs
      index_hash["created_at"] = created_at
      index_hash
    end
1125985
def get_all_files(query = {})
      response = self.get('files', nil, query).body
      
      parsed = JSON.parse(response)
      all_files = []
      parsed.each do |file_hash|
        all_files.push OmekaClient::OmekaFile.new(self, file_hash)
      end
      return all_files
    end
182295
def get_nested_dicts_with_key_value(parent_dict: dict, key, value):
    """"""
    references = []
    NestedLookup(parent_dict, references, NestedLookup.key_value_equality_factory(key, value))
    return (document for document, _ in references)
1116586
def to_hash
      hash = {
        :slug         => slug, 
        :permalink    => permalink, 
        :name         => name, 
        :children     => children,
        :siblings     => siblings,
        :parent       => parent, 
        :ancestors    => ancestors,
        :navigation   => Bonsai::Navigation.tree,
        :updated_at   => mtime,
        :created_at   => ctime
      }.merge(formatted_content).merge(disk_assets).merge(Bonsai.site)
      
      hash.stringify_keys
    end
922668
def all
      attribute_maps = [] # [{...}, {...}]
      @pages = CEO::Paginator.new(
        @model,
        current_page: current_page,
        per_page: @options.fetch(:per_page, 20)
      )

      self.total_pages = @pages.total_pages

      @pages.each do |thing|
        attr_object = {}

        # TODO: Make all of this into a method.
        # map first-level values to a hash
        keys.each do |key|
          attr_object[self.class.acronymize(key)] = thing[key.to_s]
        end

        # map nested values to a hash
        @queries.each do |query|
          attr_object.merge! query_eval(thing, query)
        end
        attribute_maps << attr_object
      end
      attribute_maps
    end
769379
def get_documents(ios)
      ios.each_with_index.map do |io, index|
        {
          documentId: "#{index + 1}",
          name: io.original_filename
        }
      end
    end
1164209
def to_hash
            index_hash = Hash.new
            index_hash['json_claz'] = self.class.name
            index_hash['id'] = id
            index_hash['org_id'] = org_id
            index_hash["account_id"] = account_id
            index_hash['name'] = name
            index_hash['cpu'] = cpu
            index_hash['ram'] = ram
            index_hash['disk'] = disk
            index_hash['regions'] = regions
            index_hash['price'] = price
            index_hash['properties'] = properties
            index_hash['category'] = category
            index_hash['status'] = status
            index_hash['created_at'] = created_at
            index_hash['updated_at'] = updated_at
            index_hash["some_msg"] = some_msg
            index_hash
        end
413570
def to_hash
      {
        response_id: response_id,
        question_id: question_id,
        option_id: option_id,
        question_pipe: question_pipe,
        submitted_at: submitted_at,
        survey_id: survey_id,
        other_text: other_text,
        answer_text: option_id || other_text ? nil : answer_text
      }.reject { |k, v| v.nil? }
    end
1283832
def get_data(self):
        
        try:
            return DocumentDataDict(self.__dict__['data'])
        except KeyError:
            self._lazy_load()
            return DocumentDataDict(self.__dict__['data'])
1166399
def to_document(input, context = {}, result = nil)
      result = call(input, context, result)
      HTML::Pipeline.parse(result[:output])
    end
1031570
def hashone(self):
    ""
    rs = self.one()
    if not rs: 
      return {}
    else:
      finds = " ".join(self._find).split(' ')
      return dict(zip((x.replace('?','') for x in finds), rs))
664583
def to_hash
      result = {}

      @values.keys.each do |field_name|
        value = __send__(field_name)
        hashed_value = value.respond_to?(:to_hash_value) ? value.to_hash_value : value
        result.merge!(field_name => hashed_value)
      end

      result
    end
286126
function() {
				var doc = this;
				var stack = [];

				_.forEach(model.$oids, function(fkType, schemaPath) {
					if (fkType.type == 'subDocument') return; // Skip sub-documents (as they are stored against the parent anyway)

					stack = stack.concat(doc.getNodesBySchemaPath(schemaPath)
						.map(function(node) {
							node.fkType = fkType.type;
							return node;
						})
					);
				});
				return stack;
			}