Open
Description
Issue
When calling transformWith
with a template that loops over items
(with {{#each items}}
) the injected function is ignored and outputted as String.
The issue occurs with this (partial) code:
data:
{ "items": [
{ ..., "status": "confirmed" },
...
] }
template:
"{{#each items}}": { "status": "{{_.upperCase(this.status)}}", }
ST code
...
const _ = require('lodash');
return ST.select(embeddedArray)
.inject({_:_})
.transformWith(template)
.root();
...
result
"status": "_.upperCase(this.status)"
Expected result
"status": "CONFIRMED"
When I look into test code, I only see a simple test case, this generic case is not covered.
Can you please take a look into this issue / point me in the right direction for a fix / pull request?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels