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.

Files for map-object, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size map_object-1.1.1-py2-none-any.whl (3.1 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size map_object-1.1.1-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes

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