title: Shopify: Using variables from {% schema %} in Javascript
body: <p>I have a custom section that uses the following schema:</p>
  
  <pre><code>{% schema %}
    {
      "name": "Custom",
      "settings": [
      {
          "type": "textarea",
          "id": "custom_text_product",
          "label": "Insert name of the product here",
          "default": "Product"
        },
      {
          "type": "textarea",
          "id": "custom_text_msg",
          "label": "Custom text",
          "default": "Insert text here"
        }
      ]
    }
  {% endschema %}
  </code></pre>
  
  <p>Basically what I want is to get the text from each textarea, manipulate via Javascript and then add it to the DOM. </p>
  
  <p>Via <code>.liquid</code> I would simply do <code>{{ section.settings.id }}</code>, but I don't know how to access them in Javascript. Because it's a big text I can't add it to the DOM as a data-attribute either.</p>
  
  <p>I have tried following <a href="https://ecommerce.shopify.com/c/ecommerce-design/t/sections-referencing-json-schema-inside-javascript-424058" rel="nofollow noreferrer">this</a> but no success.</p>
  
  <p>Can someone help me or refer me to documents regarding this? </p>
  
  <p>Thank you very much!</p>