# Use CRM data in JS

**URL:** <https://community.hubspot.com/t/use-crm-data-in-js/18199>\
**Category:** CMS Development\
**Tags:** javascript\
**Created:** [January 18, 2020, 10:19am UTC](https://community.hubspot.com/t/use-crm-data-in-js/18199 "2020-01-18T10:19:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [January 22, 2020, 2:23am UTC](https://community.hubspot.com/t/use-crm-data-in-js/18199/3 "2020-01-22T02:23:37Z")

</div>

Yes, you would need to declare the data in the HTML/HUBL. Something like:  
**HTML/HUBL**

```auto
<script>
 window.data = {
 {{ contact.tenancy_created_company|tojson }}
 }
</script>

```

**JS**

```auto
series: [{
 name: 'sales',
 data: window.data
}]

```

---

_[View the full topic](https://community.hubspot.com/t/use-crm-data-in-js/18199)._
