Skip to content

Instantly share code, notes, and snippets.

@michaelwomple
Last active May 2, 2018 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelwomple/e043cdcc8f20d6fe6acb9522560ff5ac to your computer and use it in GitHub Desktop.
Save michaelwomple/e043cdcc8f20d6fe6acb9522560ff5ac to your computer and use it in GitHub Desktop.
An example of foster parenting in AMP List.
JSON:
{
"items": [{
"prices": [
{
"priceType":"Cash",
"price": "1.99",
},
{
"priceType":"Card",
"price": "2.99",
},
{
"priceType":"BitCoin",
"price": "5.99",
}
]
}]
}
AMP List Template:
<template type="amp-mustache">
<table>
{{#prices}}
<tr>
<td>{{priceType}}:</td>
<td>$ {{price}}</td>
</tr>
{{/prices}}
</table>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment