title: read html object and replace javascript properties with read values
body: <p>I have a JavaScript parameter object with some HTML content in the following structure.</p>
  
  <pre><code>function (type, content, title) { 
  
    // Replace code should go here
  
    options = {
      "data-onclick": null; 
      "data-progress": false;
    }
  }
  </code></pre>
  
  <p>The content of the content object looks as follows:</p>
  
  <pre><code>&lt;div id=content data-onclick="onclickValue" data-progress="true"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I would like to read out the <code>data-</code> parameters from the HTML div and assign them to replace the same named function in the JavaScript function.</p>
  
  <p>All of this should happen at the top of my JavaScript function and replace the properties in the same function.</p>
  
  <p>Thanks for any help or pointers how to achieve this, I am not very skilled at JavaScript.</p>