# Help editing a Named Query turned into JSON

**URL:** <https://forum.inductiveautomation.com/t/help-editing-a-named-query-turned-into-json/66027>\
**Category:** Ignition\
**Created:** [November 2, 2022, 7:57pm UTC](https://forum.inductiveautomation.com/t/help-editing-a-named-query-turned-into-json/66027 "2022-11-02T19:57:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![IgnitionNewbie](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@IgnitionNewbie](https://forum.inductiveautomation.com/u/IgnitionNewbie)\
**Post date:** [November 2, 2022, 7:57pm UTC](https://forum.inductiveautomation.com/t/help-editing-a-named-query-turned-into-json/66027/1 "2022-11-02T19:57:22Z")

</div>

![JSON](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/5/c537b4150c34f03cb60381299d79ce1c96704b6c.jpeg)

I was given a script on here a long time ago to turn an hourmeter query into a pie chart

but now im trying to tweak it to just show a number

Im trying to get it to just show the red underlined number in here , but its showing all that stuff from the

output.append part of the script, when i remove the output append part it breaks it, any idea how to get just the number for the result?

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 2, 2022, 8:42pm UTC](https://forum.inductiveautomation.com/t/help-editing-a-named-query-turned-into-json/66027/2 "2022-11-02T20:42:42Z")

</div>

Is Minutes the same every time? If so you could probably reduce the entire thing down to something like

```auto
return value[-1]['Minutes']

```

---

<div class="post-metadata">

**Author:** ![IgnitionNewbie](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@IgnitionNewbie](https://forum.inductiveautomation.com/u/IgnitionNewbie)\
**Post date:** [November 2, 2022, 8:43pm UTC](https://forum.inductiveautomation.com/t/help-editing-a-named-query-turned-into-json/66027/3 "2022-11-02T20:43:23Z")

</div>

it is counting up every minute

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [November 2, 2022, 8:44pm UTC](https://forum.inductiveautomation.com/t/help-editing-a-named-query-turned-into-json/66027/4 "2022-11-02T20:44:41Z")

</div>

But if the column name doesn't change, then this should probably work.

---

<div class="post-metadata">

**Author:** ![IgnitionNewbie](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@IgnitionNewbie](https://forum.inductiveautomation.com/u/IgnitionNewbie)\
**Post date:** [November 4, 2022, 1:53pm UTC](https://forum.inductiveautomation.com/t/help-editing-a-named-query-turned-into-json/66027/5 "2022-11-04T13:53:09Z")

</div>

I finally got a chance to try it today and it worked like a charm, your a boss
