# How to get a value from table in HTML page

**URL:** <https://community.homey.app/t/how-to-get-a-value-from-table-in-html-page/73835>\
**Category:** Questions & Help\
**Tags:** homeyscript\
**Created:** [December 19, 2022, 1:13pm UTC](https://community.homey.app/t/how-to-get-a-value-from-table-in-html-page/73835 "2022-12-19T13:13:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Henry\_Hansen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frank_henry_hansen/32/49010_2.png) [@Frank\_Henry\_Hansen](https://community.homey.app/u/Frank_Henry_Hansen)\
**Post date:** [December 19, 2022, 1:13pm UTC](https://community.homey.app/t/how-to-get-a-value-from-table-in-html-page/73835/1 "2022-12-19T13:13:53Z")

</div>

Hi  
Can someone give me a hint or example script how to get a value from table in a HTML page?  
I have found that I have to use the fetch() function, but have not found an example how to extract the value from the variable.

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [December 19, 2022, 2:02pm UTC](https://community.homey.app/t/how-to-get-a-value-from-table-in-html-page/73835/2 "2022-12-19T14:02:23Z")

</div>

Maybe this example could help

```auto
var test = await fetch('http://gmcmap.com/historyData-plain.asp?Param_ID=44549586449&timezone=1');
const html = await test.text();
const data = JSON.parse(html.match(/\{.+?\}/s)[0]);
return data.CPM

```
