Skip to content

update replacementHandler function#12

Open
alfatahh54 wants to merge 3 commits intoCoffeeBeansLabs:masterfrom
alfatahh54:master
Open

update replacementHandler function#12
alfatahh54 wants to merge 3 commits intoCoffeeBeansLabs:masterfrom
alfatahh54:master

Conversation

@alfatahh54
Copy link

I fixed the replacementHandler function so that it can execute js script with the marker "{{..}}"

example:
const transformationMapping = {
name: {
first_name: 'John',
last_name: 'Doe'
},
age: 30,
profession: 'Designer'
}

const input ="Hallo, my name {{name.first_name + ' ' + name.last_name}}. I am {{age}} years old, and my profession is {{profession}}"
const result = replacementHandler(input, exampleObject)
console.log(result)

it will show result with value "Hallo, my name John Doe. I am 30 years old, and my profession is Designer"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant