wankdanker / node-object-mapper

Copy properties from one object to another.
MIT License
277 stars 73 forks source link

Mapper on version 6 behaves differently #69

Open bamanuel opened 4 years ago

bamanuel commented 4 years ago

Here is a concise example of the issue:

const mapper = require('object-mapper');

const data = [
  { 'identification': 1235, 'name': 'John Doe'},
  { 'identification': 9876, 'name': 'Brock Doe' }];

result = mapper(data, {'identification': `'id'});`
//object-mapper@6.0.1 returns { id: 1235 }
//object-mapper@5.0.0 returns { id: [ 1235, 9876 ] }