title: How to mix the result of multiple json data sources in AMP?
body: <p>I'm outputting a list of links in which I need to mix values in the template coming from not one, but two individual JSON data sources.</p>
  
  <p>Pseudo markup:</p>
  
  <pre><code>&lt;a href="{link1}/{link2}"&gt;{title1}&lt;/a&gt;
  </code></pre>
  
  <p>In the example above, link1 and title1 would come from JSON #1, whilst link2 would come from JSON #2. </p>
  
  <p>To be clear: I know this challenge can be entirely avoided by merging the JSON data sources into a single service, yet in my scenario this is not possible, reasons aren't relevant.</p>
  
  <p>Expanding a bit more on the total idea, the above pseudo markup I'm wrapping into an amp-list:</p>
  
  <pre><code>&lt;amp-list id="mylist" width="auto" height="160px" layout="fixed-height" src="//json1"&gt;
      &lt;template type="amp-mustache"&gt;
          &lt;a href="{{buyURL}}={{UID}}"&gt;
             &lt;amp-img src="{{logoURL}}" width="{{logoWidth}}" height="{{logoHeight}}" layout="fixed" alt="{{name}}"&gt;
              &lt;/amp-img&gt;
           &lt;/a&gt;
      &lt;/template&gt;
  &lt;/amp-list&gt;
  </code></pre>
  
  <p>I've removed attributes irrelevant for the question. In the above code, all variables are coming from json1, except for the <strong>{{UID}}</strong> one. This one needs to come from a separate json service, let's call it json2 for now.</p>
  
  <p>My challenge is therefore to integrate a value coming from a 2nd data source and mixing it into the template output binded to the first data source. Here's what I have tried:</p>
  
  <ul>
  <li>Nesting templates within each other does not seem allowed, it throws an AMP error</li>
  <li>Nesting lists is allowed, yet you can only put the template within the hierarchy of the correct list. Putting them on the same level makes AMP simply pick the first or throw an error "template not found".</li>
  </ul>
  
  <p>I am stuck in implementing the above scenario. I don't know how to approach it, or where it is at all possible.</p>