# Create JSON Message format from tags

**URL:** <https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868>\
**Category:** Ignition\
**Created:** [March 25, 2024, 8:52pm UTC](https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868 "2024-03-25T20:52:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adekunle\_Bakare](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Adekunle\_Bakare](https://forum.inductiveautomation.com/u/Adekunle_Bakare)\
**Post date:** [March 25, 2024, 8:52pm UTC](https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868/1 "2024-03-25T20:52:45Z")

</div>

I am still learning Ignition. Please I am trying to convert some set of tags (Picture 1) to Json format that I can send to our MES system in this format {"device": "CMN\_WELD", "good": 10, "bad": 0,"scrap": 1, "lot": "lot001", "start": "1", "partno":"6426732" }. I tried to implement the solution below but I am just not getting it.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/8/88cb555ea6e5537f31860b602157ad4dfc2e516f.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/7/2796223e3b58465ed655c2134fd61782ff1c44b4.jpeg)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 25, 2024, 9:04pm UTC](https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868/2 "2024-03-25T21:04:33Z")

</div>

It might be easier to iterate on this script in the script console while you get it working.

I don't think your tag paths should have curly brackets around them.

---

<div class="post-metadata">

**Author:** ![Adekunle\_Bakare](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Adekunle\_Bakare](https://forum.inductiveautomation.com/u/Adekunle_Bakare)\
**Post date:** [March 25, 2024, 8:26pm UTC](https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868/3 "2024-03-25T20:26:36Z")

</div>

Hi @Franz_Loschenberger. Please were you able to implement this? I am having a hard time getting this done on my end

---

<div class="post-metadata">

**Author:** ![Adekunle\_Bakare](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Adekunle\_Bakare](https://forum.inductiveautomation.com/u/Adekunle_Bakare)\
**Post date:** [March 25, 2024, 8:47pm UTC](https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868/4 "2024-03-25T20:47:01Z")

</div>

Hi @pturmel and @pascal.fragnoud...I am still learning Ignition. Please I am trying to convert some set of tags (Picture 1) to Json format that I can send to our MES system in this format {"device": "CMN\_WELD", "good": 10, "bad": 0,"scrap": 1, "lot": "lot001", "start": "1", "partno":"6426732" }. I tried to implement the solution above but I am just not getting it.

![Audit 2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/8/98ce1b5e7590847c60bd19708c16f40e318a5de6.jpeg)

 ![Audit 1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c7b13cf59799fc3485e4bb747153d47768f63cf3.jpeg)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 25, 2024, 9:07pm UTC](https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868/5 "2024-03-25T21:07:56Z")

</div>

Please don't repeatedly post on the same issue. You've waited 40 minutes so far for help. If you want help urgently, contact our support department officially. This forum is largely volunteer run.

Your script looks approximately correct, except for the curly braces Kevin noted.

---

<div class="post-metadata">

**Author:** ![Adekunle\_Bakare](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Adekunle\_Bakare](https://forum.inductiveautomation.com/u/Adekunle_Bakare)\
**Post date:** [March 25, 2024, 9:16pm UTC](https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868/6 "2024-03-25T21:16:40Z")

</div>

I am sorry @Kevin.Herron and @paul-griffith just trying to get it resolved faster. Thanks for the reply

I removed the curly braces but it returned a null as showing in the picture.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c7df5aca6fc663e5d7c93a3c48744859e76d1e44.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/9/c944e681941be8e762d0810927d41c5f32e57ae5.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 25, 2024, 9:22pm UTC](https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868/7 "2024-03-25T21:22:39Z")

</div>

You're returning `value`, not `tagDict`, the new variable you've created.

---

<div class="post-metadata">

**Author:** ![Adekunle\_Bakare](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Adekunle\_Bakare](https://forum.inductiveautomation.com/u/Adekunle_Bakare)\
**Post date:** [March 25, 2024, 9:23pm UTC](https://forum.inductiveautomation.com/t/create-json-message-format-from-tags/87868/8 "2024-03-25T21:23:20Z")

</div>

Thank you
