Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using expressions and js functions inside withTemplate #63

Closed
rameshjanjyam opened this issue Dec 30, 2022 · 2 comments
Closed

using expressions and js functions inside withTemplate #63

rameshjanjyam opened this issue Dec 30, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@rameshjanjyam
Copy link

Hello,

is there a way to run expressions on the source values.

for example - source.id = /susbcriptions/1234/resourcegroups/rg1

and I want to get the subscription id from that string which can be done using source.id.split("/")[2]

this didnt work

"withTemplate": "${resource_group.id.split('/')[2]}",

any suggestions acheive this?

@perpk
Copy link
Owner

perpk commented Dec 31, 2022

Hi @rameshjanjyam, thanks for the inquiry!

This isn't supported in the currently published version, yet I'll look into it immediately and I'll consider publishing this as a new feature in version 1.3.0 which will be published within the next week.

@perpk perpk added the enhancement New feature or request label Dec 31, 2022
@perpk perpk added this to the Version 1.3.0 milestone Dec 31, 2022
@perpk perpk self-assigned this Dec 31, 2022
@rameshjanjyam
Copy link
Author

Thank you @perpk

perpk added a commit that referenced this issue Jan 2, 2023
perpk added a commit that referenced this issue Jan 3, 2023
* Chore: updated .gitignore for local scrappad

* WIP #63

* WIP #63 Added transformation of values based on standard ops via lodash invoke

* Chore: Add tests
perpk added a commit that referenced this issue Jan 14, 2023
* Fix #47 value-based mapping (#52)

* Fix #27 Async execution (#59)

* Fix #25: Process array data in source (#62)

* Fix #25: Process array data in source

* Fix #25: Additional test

* 63 using expressions and js functions inside withtemplate (#64)

* Chore: updated .gitignore for local scrappad

* WIP #63

* WIP #63 Added transformation of values based on standard ops via lodash invoke

* Chore: Add tests

* Fix #29 Empty objects in target json (#65)

* 60 execute mapping on multiple files (#67)

* Chore: updated .gitignore for local scrappad

* Fix #60 Mapping on files via streams

* Update package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants