Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: object-mapper
node v10.24.1
endpoint
share
tweet
var objectMapper = require("object-mapper") let map = { 'nbMember': 'maxPlayerCount', 'activityList[].id': 'activityList[].id', } let objectToMap = {nbMember : 5, activityList: []} console.log(objectMapper(objectToMap, map));
Created from: https://npm.runkit.com/object-mapper
Loading…
Clone and edit this document