Member Junction
    Preparing search index...

    Action that transforms data using Nunjucks templates Provides powerful templating capabilities for data transformation

    // Simple object mapping
    await runAction({
    ActionName: 'Data Mapper',
    Params: [{
    Name: 'SourceData',
    Value: { user: { firstName: 'John', lastName: 'Doe', age: 30 } }
    }, {
    Name: 'MappingTemplate',
    Value: {
    fullName: '{{ user.firstName }} {{ user.lastName }}',
    displayName: '{{ user.firstName | upper }}',
    ageGroup: '{% if user.age < 18 %}minor{% elif user.age < 65 %}adult{% else %}senior{% endif %}'
    }
    }]
    });

    // Array transformation
    await runAction({
    ActionName: 'Data Mapper',
    Params: [{
    Name: 'SourceData',
    Value: [{ price: 10, qty: 2 }, { price: 20, qty: 1 }]
    }, {
    Name: 'MappingTemplate',
    Value: {
    total: '{{ price * qty }}',
    formattedPrice: '${{ price | number(2) }}'
    }
    }, {
    Name: 'IterateArrays',
    Value: true
    }]
    });

    // String template
    await runAction({
    ActionName: 'Data Mapper',
    Params: [{
    Name: 'SourceData',
    Value: { name: 'John', items: ['apple', 'banana'] }
    }, {
    Name: 'MappingTemplate',
    Value: 'Hello {{ name }}, you have {{ items | length }} items: {{ items | join(", ") }}'
    }, {
    Name: 'TemplateType',
    Value: 'string'
    }]
    });

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    Constructors

    Methods