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.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

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 Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page