Update each fields separately

@param String $field_name

@return mixed
500404
public static function updateField($field_name)
    {
        $irregular = [
            'get_started' => 'get_started_button_payload',
            'greeting'    => 'greeting_text'
        ];
        
        if ( ! isset($irregular[$field_name])) {
            $field_value = Instance::get($field_name);
        } else {
            $field_value = Instance::get($irregular[$field_name]);
        }
    
        $resource = self::getResourceUrl();
    
        if ( ! empty($field_value) && ! is_null($field_value)) {
            
            $data = [
                $field_name => $field_value
            ];
    
            if ($field_name === 'get_started') {
                $data = [
                    'get_started' => [
                        'payload' => $field_value,
                    ],
                ];
            }
    
            return Request::send($resource, $data);
        }
    
        return self::deleteFields($field_name);
    }
488961
protected function updateFieldValue($field_value_id)
    {
        if (!$this->isError() && !$this->field_value->update($field_value_id, $this->getSubmitted())) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
119304
public function updateFormFields(FieldList $fields, Controller $controller, $name, $context)
    {
        // Check Record Type:
        
        if ($context['Record'] instanceof Image) {
            
            // Update Field Objects:
            
            $fields->insertAfter(
                'ParentID',
                DropdownField::create(
                    'CropPriority',
                    _t(__CLASS__ . '.CROPPRIORITY', 'Crop priority'),
                    $this->getCropPriorityOptions()
                )
            );
            
        }
    }
435590
public function getFieldValues(string $field_name)
    {
        try {
            $field = [];
            $result = $this->stmt->fetchAll(\PDO::FETCH_ASSOC);
            if (array_key_exists($field_name, $result[0])) {
                foreach ($result as $row) {
                    $field[] = $row[$field_name];
                }
            } else {
                throw new \Exception("Field '$field_name' is not present in the current result set.\n");
            }
            return $field;
        } catch (\PDOException $e) {
            die('Error: ' . $e->getMessage());
        } catch (\Exception $e) {
            die("Error: " . $e->getMessage());
        }
    }
376067
protected function setField($field_id)
    {
        $this->data_field = array();

        if (is_numeric($field_id)) {

            $conditions = array(
                'language' => 'und',
                'field_id' => $field_id
            );

            $this->data_field = $this->field->get($conditions);

            if (empty($this->data_field)) {
                $this->outputHttpStatus(404);
            }

            $this->prepareField($this->data_field);
        }
    }
205432
def set_field(self, field_name, field_val=None):
        
        field_name = self._normalize_field_name(field_name)
        self.fields_set.append(field_name, [field_name, field_val])
        return self
800279
public function getUpdate()
    {
        $update = [];

        foreach ($this->update as $field => $data) {
            list($type, $value) = $data;

            if (! isset($update[$type])) {
                $update[$type] = [];
            }

            $update[$type][$field] = $value;
        }

        if ($this->atomic) {
            $update['$atomic'] = 1;
        }

        return $update;
    }
969331
def update_fields(fields)
      attributes[:id]      = fields['id'] || attributes[:id]
      attributes[:state]   = fields['state'] || attributes[:state]
      attributes[:item_id] = fields['idCheckItem'] || attributes[:item_id]
      self
    end
55075
public static function array_row_field_to_key(array $array, $row_field_name )
    {
        if (!is_array($array)) {
            return array();
        }
        $temp_data = array();
        foreach($array as $key => $row ){
            if (isset($row[$row_field_name])) {
                $temp_data[$row[$row_field_name]] = $row;
            }
            unset($array[$key]);
        }
        return $temp_data;
    }
763383
protected function parseFields($fields, $name) {
		if(is_array($fields)) {
			return new self(
				$fields,
				$name,
				(isset($this->data[$name]) ? $this->data[$name]:[]),
				$this
			);
		}
		elseif($fields instanceof Field) {
			$field = $fields;
			$field->setName($name);
			$field->setParent($this);

			if(isset($this->data[$name]))
				$field->setValue($this->data[$name]);

			return $field;
		}
		elseif($fields instanceof self) {
			$group = $fields;
			$group->setName($name);
			$group->setParent($this);
			$group->setData(
				(isset($this->data[$name]) ? $this->data[$name]:[])
			);

			return $group;
		}
	}
256557
public function mapTaxonomyTermField($field_name, $vid) {
    $entities = $this->populateTaxonomyTermField($field_name, $vid);
    if (!empty($entities)) {
      return $entities;
    }
    return [];
  }
534039
public function getTypeByFieldName($field_name)
    {
        if (isset($this->dictated[$field_name])) {
            return $this->dictated[$field_name];
        }

        if (substr($field_name, 0, 3) === 'is_' || in_array(substr($field_name, 0, 4), ['has_', 'had_', 'was_']) || in_array(substr($field_name, 0, 5), ['were_', 'have_'])) {
            return self::CAST_BOOL;
        }

        $last_three = substr($field_name, -3);

        if ($last_three === '_id') {
            return self::CAST_INT;
        }

        if ($last_three === '_on') {
            return self::CAST_DATE;
        }

        if ($last_three === '_at') {
            return self::CAST_DATETIME;
        }

        return self::CAST_STRING;
    }
1123435
function update_field( $field, $post_id )
	{
		// sanitize field name
		// - http://support.advancedcustomfields.com/discussion/5262/sanitize_title-on-field-name
		// - issue with camel case! Replaced with JS
		//$field['name'] = sanitize_title( $field['name'] );
		
		
		// filters
		$field = apply_filters('acf/update_field/type=' . $field['type'], $field, $post_id ); // new filter
		
		
		// clear cache
		wp_cache_delete( 'load_field/key=' . $field['key'], 'acf' );
	
		
		// save
		update_post_meta( $post_id, $field['key'], $field );
	}
177294
public function setWhereList($field_list = array())
    {
        if (empty($field_list)) $this->_where_list = array();
        $this->_where_list = (array)$field_list;

        return $this;
    }
136657
public function setFieldList($field_list = array())
    {
        if (empty($field_list)) $this->_field_list = array('*');
        $this->_field_list = (array)$field_list;

        return $this;
    }
395903
public function updateCMSFields(FieldList $fields)
    {
        $fieldEditor = $this->getFieldEditorGrid();

        $fields->insertAfter(new Tab('FormFields', _t(__CLASS__.'.FORMFIELDS', 'Form Fields')), 'Main');
        $fields->addFieldToTab('Root.FormFields', $fieldEditor);

        return $fields;
    }
828993
public function update($fields) {
        if (is_array($fields)) {
            foreach ($fields as $key => $value) {
                if (is_string($value)) {
                    array_push($this->_updates, $key . ' = \'' . addslashes($value) . '\'');
                } else {
                    array_push($this->_updates, $key . ' = ' . $value);
                }
            }
        } else {
            return false;
        }
        
        $sql_query = 'UPDATE ' . $this->_table . 
                     ' SET ' . implode($this->_updates, ', ');
        
        // Where statements
        if (count($this->_where)) {
            $sql_query .= ' WHERE ';
            $sql_query .= implode($this->_where, ' AND ');
            
            // or statements
            if (count($this->_or)) {
                $sql_query .= ' OR ';
                $sql_query .= implode($this->_or, ' AND ');
            }
        }
        
        // Set the query
        $this->_sql_query = $sql_query;
        
        return $this;
    }