# Perspective formatting query as JSON output

**URL:** <https://forum.inductiveautomation.com/t/perspective-formatting-query-as-json-output/92925>\
**Category:** Ignition\
**Tags:** vision, perspective\
**Created:** [July 8, 2024, 10:17pm UTC](https://forum.inductiveautomation.com/t/perspective-formatting-query-as-json-output/92925 "2024-07-08T22:17:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RD17](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@RD17](https://forum.inductiveautomation.com/u/RD17)\
**Post date:** [July 8, 2024, 10:17pm UTC](https://forum.inductiveautomation.com/t/perspective-formatting-query-as-json-output/92925/1 "2024-07-08T22:17:23Z")

</div>

I have a label in my Ignition Perspective project that is bound to a Query Binding. The label is supposed to display an integer, but it is displaying the integer in JSON format instead.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/4/740e03dc2bf391a824aea5c90aceb11c84f070ac.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/24475de3d6b09a017c4ca4b888262690f84f16cc.png)

I have verified that my query is correct because the same query in Vision displays a plain integer, and in the testing section of Named Queries, it also shows the integer correctly. Why is the Query Binding giving me a JSON output instead of the plain integer only in a label? I have tried casting as a String in my SQL query but that just gets me **[{"String here":0}]** I know I am missing something but not sure what. New to Perspective and could use some help. Thanks!

---

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [July 8, 2024, 10:27pm UTC](https://forum.inductiveautomation.com/t/perspective-formatting-query-as-json-output/92925/2 "2024-07-08T22:27:26Z")

</div>

Try setting the return format to scalar in the query binding.

---

<div class="post-metadata">

**Author:** ![RD17](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@RD17](https://forum.inductiveautomation.com/u/RD17)\
**Post date:** [July 8, 2024, 10:35pm UTC](https://forum.inductiveautomation.com/t/perspective-formatting-query-as-json-output/92925/3 "2024-07-08T22:35:08Z")

</div>

Thank you, that did the trick. It was set to auto.
