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.

Filename, size & hash SHA256 hash help File type Python version Upload date
map_object-1.1.1-py2-none-any.whl (3.1 kB) Copy SHA256 hash SHA256 Wheel py2
map_object-1.1.1-py3-none-any.whl (3.1 kB) Copy SHA256 hash SHA256 Wheel py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page