Skip to main content

A method for mapping dict objects as if it were an array

Project description

Map Object

A python implementation of the map-obj function


pip install map_object


from map_object import mapObject

def mapper (key, value, source):
  return [value, ley]

newObject = mapObject({'foo'='bar'}, mapper);
# => {bar: 'foo'}


mapObject(source, mapper)


Type: Object

Source object to copy properties from.


Type: Function

Mapping function.

  • It has signature mapper(sourceKey, sourceValue, source)
  • It must return a two item array: [targetKey, targetValue].



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Built Distributions

map_object-1.1.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded py3

map_object-1.1.1-py2-none-any.whl (3.1 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page