title: Is it possible to use javascript tagged template string to interpolate over an array value?
body: <p>Let's assume there is an object <code>table</code> like this (representing a database table structure):</p>
  
  <pre><code>table = { name: "Some table", code: "SOME_TABLE", 
    columns: [
      { name : "Identifier", code: "ID", typ: "number" },
      { name : "Description", code: "DESCR", typ: "varchar2", length: 255 },
    ]
  }
  </code></pre>
  
  <p>Is there a pattern how to write substitution function that would allow interpolation of <code>table.columns</code> array within a tagged template literal?</p>
  
  <p>Something like</p>
  
  <pre><code>function sqlCreate ( strings, ...values ) { 
     ... do something very smart ...
  }
  </code></pre>
  
  <p>and use it:</p>
  
  <pre><code>sqlCreate`create table ${table.code} ( ...something...${table.columns}...inner template...${'.code'} ${'.typ'}...end of inner template )`
  </code></pre>
  
  <p>where <code>${'.code'}</code> and <code>${'.type'}</code> would somehow refer to the properties of object in <code>table.column</code> array.</p>
  
  <p>I tried to figure out but it seems it doesn't make much sense and instead there should be a specialized generator function that would do the right thing.</p>
  
  <p>Are you aware of any successful attempt to solve this as a "pure template solution"?</p>