Skip to content

How is mapping of nested properties in collections performed? #60

@Neutrino-Sunset

Description

@Neutrino-Sunset

Given this

var test1 = {
   'array1' : [
      {
         'prop1': 42,
         'prop2': 43
      },
      {
         'prop1': 42,
         'prop2': 43
      },
      {
         'prop1': 42,
         'prop2': 43
      }
   ]
};

How do I create a mapping that adds another property to the objects in the collection?

      automapper.createMap('a', 'b')
         .forMember('array1.prop3 ???', function() { return 56; });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions