You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, thank you so much for maintaining this project. I am trying to adapt the standard line example - I would like to use a template like this:
`
var data = {
items: [1,2,3,100,10,19]
};
var template = {
"{{#each items}}": {
"{{this}}": {
id: "{{this}}"
}
}
}
but I cannot get {{this}} to evaluate correctly twice.
Is there a way to generate the output that I'm trying to generate -- {{this}} works fine more than once in sibling values, not quite sure why I can't use it as a parent key...or how to bind a single variable to reuse the value
The text was updated successfully, but these errors were encountered:
Firstly, thank you so much for maintaining this project. I am trying to adapt the standard line example - I would like to use a template like this:
`
var data = {
items: [1,2,3,100,10,19]
};
var template = {
"{{#each items}}": {
"{{this}}": {
id: "{{this}}"
}
}
}
ST.select(data)
.transformWith(template)
.root()
`
My desired output is
[ { "1": { "id": "1" } },...
but I cannot get {{this}} to evaluate correctly twice.
Is there a way to generate the output that I'm trying to generate -- {{this}} works fine more than once in sibling values, not quite sure why I can't use it as a parent key...or how to bind a single variable to reuse the value
The text was updated successfully, but these errors were encountered: