title: python-docx get tables from paragraph
body: <p>I have .docx file with many paragraphs and tables like:</p>
  
  <ol>
  <li>par1
  <ul>
  <li>table1</li>
  <li>table2</li>
  <li>table3</li>
  </ul></li>
  <li><p>par2</p>
  
  <ul>
  <li>table1</li>
  <li>table2</li>
  </ul>
  
  <p>2.1 par21</p>
  
  <ul>
  <li>table1</li>
  <li>table2</li>
  </ul></li>
  </ol>
  
  <p>I need to iterate all objects and make dictionary, maybe in json format like:</p>
  
  <pre>   {par1: [table1, table2, table3], par2[table1,table2, {par21: [table1,table2]} ] }
  </pre>
  
  <pre>
      from docx.api import Document
  
      filename = 'test.docx'
      document = Document(docx=filename)
      for table in document.tables:
          print table
  
      for paragraph in document.paragraphs:
          print paragraph.text
  </pre>
  
  <p>How can I relate each paragraph and tables?</p>
  
  <p>Can you suggest something ?</p>