js-remapped
js-remapped copied to clipboard
Translate objects using dot notated mappings.
Here is the code ``` var remapped = require('remapped'); var source = { arr: ["0", "1", "2"], }; var mapping = { myarr: 'arr', }; remapped(source, mapping); ``` The result...
Is it possible to avoid creation of properties if values are undefined?
E.g. a mapping of `"geo.latitude": "latitude"` should result in an object like: ``` javascript { "geo": { "latitude": 45.01 } } ```