Last active
March 29, 2019 11:21
-
-
Save ferryferry/9961feffaa35a3103b7cfd6d54a85975 to your computer and use it in GitHub Desktop.
Liquid template to transform product data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"items": [{ | |
"itemNo": "1234", | |
"name": "Design lamp", | |
"longDesc": "It lights up" | |
}, | |
{ | |
"itemNo": "1234", | |
"name": "Design lamp", | |
"longDesc": "It lights up" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"number": "1234", | |
"name": "Design lamp", | |
"description": "It lights up" | |
}, { | |
"number": "1234", | |
"name": "Design lamp", | |
"description": "It lights up" | |
}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{% for product in items %}{ | |
"number": "{{product.itemNo}}", | |
"name": "{{product.name}}", | |
"description": "{{product.longDesc}}" | |
}{% if forloop.last == false%}, {% endif %}{% endfor %}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment