I have developed a code which retrieves json data from the backend server using amp-list. Based on one of the variable from the server, I want to have an if condition. Mentioned below an example of what I wish to accomplish:
<html ⚡4email data-css-strict>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script>
<script async custom-element="amp-list" src="https://cdn.ampproject.org/v0/amp-list-0.1.js"></script>
<style amp4email-boilerplate>body{visibility:hidden}</style>
<style amp-custom>
h1 {
margin: 1rem;
}
</style>
</head>
<body>
<amp-list template="list-template" src="https://random_server_link/get_x_value_and_y_value" layout="responsive">
<template id="list-template" type="amp-mustache">
{% if {{x}} == {{y}} %}
<p>
x == y
</p>
{% elif {{x}} != {{y}} %}
<p>
x not equal to y
</p>
{% else %}
<p>
else condition
</p>
{% endif %}
</template>
</amp-list>
<h1>Hello, I am an AMP EMAIL!</h1>
</body>
</html>
The above code doesn't work and I need an alternative for the if-else condition.
Thanks