# HomeyScript: Any sane ways to use args?

**URL:** <https://community.homey.app/t/homeyscript-any-sane-ways-to-use-args/66178>\
**Category:** Questions & Help\
**Tags:** homeyscript\
**Created:** [July 17, 2022, 10:09pm UTC](https://community.homey.app/t/homeyscript-any-sane-ways-to-use-args/66178 "2022-07-17T22:09:03Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [July 18, 2022, 2:45pm UTC](https://community.homey.app/t/homeyscript-any-sane-ways-to-use-args/66178/5 "2022-07-18T14:45:41Z")

</div>

On a similar line to @homeypro solution, but without needing to parse the args every time is to add the following as the first line of the script:  
`const flow_args = JSON.parse(args[0]);`

then just use `flow_arg.arg1`, etc, to get the values.

You can also assign more meaningful names and use tags:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/f/1ff3dab1c02c96ea1fed03485424512ff8c6ee18.png)

Notice the quotes around the Weather token as that is a string.

---

_[View the full topic](https://community.homey.app/t/homeyscript-any-sane-ways-to-use-args/66178)._
