We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is it possible to transform nested objects? Let's say we have an object with a liveData property which is an object with nested objects...
"liveData": { "score": { "home": "1", "away": "0" }, "clock": { "secondsSinceStart": 3792, "clockStopped": false } }
.. and we need to tranform it to the following:
"live": { "sc": { "h": "0", "a": "0" }, "t": { "s": 3792, "st": false } }
So what is the template for livedata object? I tried the following approach but no luck.
import livedataTemplate from './livedata.template'; let template = "live": livedataTemplate;
livedataTemplate looks like this.
import scoreTemplate from './score.template'; import clockTemplate from './clock.template'; export default { "{{livedata}}": { "sc": scoreTemplate, "t": clockTemplate }
.. score / clock templates respectively..
export default { "{{score}}": { "h": "{{home}}", "a": "{{away}}" } }
export default { "{{clock}}": { "s": "{{secondsSinceStart}}", "st": "{{clockStopped}}" } }
what am I doing wrong? any help would be appreciated, thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is it possible to transform nested objects?
Let's say we have an object with a liveData property which is an object with nested objects...
.. and we need to tranform it to the following:
So what is the template for livedata object?
I tried the following approach but no luck.
livedataTemplate looks like this.
.. score / clock templates respectively..
what am I doing wrong? any help would be appreciated, thanks!
The text was updated successfully, but these errors were encountered: