# JSON Object in Global Variable

**URL:** <https://forum.katalon.com/t/json-object-in-global-variable/39436>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [February 4, 2020, 2:24pm UTC](https://forum.katalon.com/t/json-object-in-global-variable/39436 "2020-02-04T14:24:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wolczoskar](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/wolczoskar/32/16812_2.png) [@wolczoskar](https://forum.katalon.com/u/wolczoskar)\
**Post date:** [February 4, 2020, 2:24pm UTC](https://forum.katalon.com/t/json-object-in-global-variable/39436/1 "2020-02-04T14:24:49Z")

</div>

Hello,  
Im wondering how can i put JSON object in Profiles in katalon.  
Im using this function to get my object in the test case.

```
def universal_variable = WebUI.executeJavaScript('return window.universal_variable;', null)

```

Then in profile i have something like that

 ![Screenshot_217](https://europe1.discourse-cdn.com/katalon/original/2X/d/da86fbed12e0e483e3d569eb6528d3a0af301183.png)

And last thing i am compering the object that im getting using a function with string in global variable by using that function

```
if ((universal_variable['page_type']) != GlobalVariable.page_type_uv) {
KeywordUtil.markFailed('Bad page_type: ' + (universal_variable['page_type']))

```

}

And its causing me to have a lot global variables like this. I would rather have included for example whole this thing in one variable and compare it to the object that im getting from the site

```
    article: id: "7398791" content_type: "article" article_type: "News" word_count: "794"

```

Thanks for any help

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [February 4, 2020, 4:59pm UTC](https://forum.katalon.com/t/json-object-in-global-variable/39436/2 "2020-02-04T16:59:12Z")

</div>

Try `List` or `Map`.

I don’t believe I’ve ever tried this. But give it a go and see what happens.

I don’t quite understand your second question.
