# Working with page structured data

**URL:** <https://community.weweb.io/t/working-with-page-structured-data/3846>\
**Category:** How do I?\
**Created:** [August 11, 2023, 11:22am UTC](https://community.weweb.io/t/working-with-page-structured-data/3846 "2023-08-11T11:22:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jack/32/5915_2.png) [@Jack](https://community.weweb.io/u/Jack)\
**Post date:** [August 11, 2023, 11:22am UTC](https://community.weweb.io/t/working-with-page-structured-data/3846/1 "2023-08-11T11:22:45Z")

</div>

Hi all,

In my dashboard, each page and subpage has a Google Material Icon associated with it in the sidebar. We also reference that page’s icon in the topbar to show the folder the page is in (screenshot attached).

In an ideal world, I’d define the page’s icon at the page level and reference it dynamically in the sidebar and topbar (this also allows the topbar to be a linked section AKA WeWeb’s version of a reusable elements).

I could technically store these icon names in the database and fetch them on page load, but feels easier / less maintenance to do this entirely on the frontend. I’ve been trying to use the ‘Structured data’ at the page level (screenshot attached), which requires JSON, but when I try to reference it dynamically, the only key is ‘en’ and its difficult to reference to actual keys and values. I’m thinking that this is a bug since the actual structured data should be an object within ‘structuredData’.

Does anyone have experience working with the page structured data? Thanks!

Jack

![CleanShot 2023-08-11 at 07.10.39@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/741a25551a8f874762b6c7ec2d54fe27d24f7e68.png)

 ![CleanShot 2023-08-11 at 07.09.00@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bd328b289648c86de69e746c54f2b9deb07f9ad3.png)

 ![CleanShot 2023-08-11 at 07.18.51@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/afa63e069d295d86492ae83439bfbb81d1ed27b2.png)

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [August 11, 2023, 1:24pm UTC](https://community.weweb.io/t/working-with-page-structured-data/3846/2 "2023-08-11T13:24:02Z")

</div>

Hi @Jack 👋

Not sure I understand your use case. Do you want search engines to display an icon before the name of the page?

Could you share a screenshot of your dashboard page or record a short video walking us through your project, what you tried and what you’re trying to accomplish?

---

<div class="post-metadata">

**Author:** ![Jack](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jack/32/5915_2.png) [@Jack](https://community.weweb.io/u/Jack)\
**Post date:** [August 11, 2023, 1:53pm UTC](https://community.weweb.io/t/working-with-page-structured-data/3846/3 "2023-08-11T13:53:31Z")

</div>

@Joyce apologies for the lack of clarity.

My question boils down to my last screenshot of the structuredData variable: why is the inputted JSON data a text field and not an object? It makes it impossible to reference the key values in formulas, to my understanding. Maybe I am missing something?

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [August 11, 2023, 2:36pm UTC](https://community.weweb.io/t/working-with-page-structured-data/3846/4 "2023-08-11T14:36:36Z")

</div>

@Jack, in theory you can do a custom JavaScript trick with `JSON.parse([en_variable]).tab_icon`  
What backend are you using? How are you storing your JSON?

See this reference - [JSON.parse() - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)

---

<div class="post-metadata">

**Author:** ![Jack](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jack/32/5915_2.png) [@Jack](https://community.weweb.io/u/Jack)\
**Post date:** [August 11, 2023, 2:45pm UTC](https://community.weweb.io/t/working-with-page-structured-data/3846/5 "2023-08-11T14:45:02Z")

</div>

thanks @Broberto! Using Xano but trying to keep this entirely on the frontend and using WeWeb’s native ‘structured data’ section under the page metadata.

Will look into JSON.parse! This seems like a bug due to how WeWeb treats languages.

_Update: It worked with JSON.parse. Good one to know for next time, thanks!_
