how can i access the spConfig variable in a custom function on product view page.
<script type="text/x-magento-init">
{
"#product_addtocart_form": {
"configurable": {
"spConfig": {"attributes":{"93":{"id":"93","code":"color","label":"Color","options":}},
"gallerySwitchStrategy": "prepend"
}
}
}
}
</script>
when i try to log the
var sp_config = $('#product_addtocart_form').data();
console.log(sp_config);
the console log shows the following screen, and i have to access the option prices,