Skip to main content

add_field_to_map

No overview available.

def add_field_to_map(
map: dict,
field_name: string,
field_value: any
) - > null

Adds a specific field and its value to a provided dictionary map. This utility is used to dynamically populate data structures with key-value pairs during data transformation or object construction.

Parameters

NameTypeDescription
mapdictThe dictionary object that will be updated with the new field.
field_namestringThe key representing the name of the field to be added to the map.
field_valueanyThe value associated with the field name to be stored in the map.

Returns

TypeDescription
nullNothing; the dictionary passed as the map parameter is modified in-place.