# Keep precipitation for 10 days in an array or fifo queue with 10 places and add a new value every day

**URL:** <https://community.homey.app/t/keep-precipitation-for-10-days-in-an-array-or-fifo-queue-with-10-places-and-add-a-new-value-every-day/83472>\
**Category:** Questions & Help\
**Created:** [June 28, 2023, 7:26pm UTC](https://community.homey.app/t/keep-precipitation-for-10-days-in-an-array-or-fifo-queue-with-10-places-and-add-a-new-value-every-day/83472 "2023-06-28T19:26:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [June 30, 2023, 9:17pm UTC](https://community.homey.app/t/keep-precipitation-for-10-days-in-an-array-or-fifo-queue-with-10-places-and-add-a-new-value-every-day/83472/4 "2023-06-30T21:17:14Z")

</div>

@pmeester

You can use the JSON handler app for handlering jsons.

But even in the BetterLogicLibrary you can use arrays.  
Just place [1,2,3,4] in a variable for instance.  
Now, use the BLL expression cards and place the variable containing the array in it, plus `[0]` behind it, and you will recieve the fiest element in the array.

BLL alows predefined functions, so you can create push functions for instance.

Example:

> [@\[APP\]\[Pro\] Better Logic Library - For Users](https://community.homey.app/t/app-pro-better-logic-library-for-users/71876/35):
>
> Hey @Rrrr , Wel, yeah, not specificly, but generally, BLL supports Arrays. because i don’t exactly know how users will want to use this, i haven’t implemented special array functions or anything, but you can do that yourself quite easily. For instance, here a small array functionality. Create a BLL function called pushAsString and place this in it’s body: function(arr, value) { arr.push(value); return JSON.stringify(arr); } Add a flowcard Set variable to text: Set ArrayTest to [] A…

---

_[View the full topic](https://community.homey.app/t/keep-precipitation-for-10-days-in-an-array-or-fifo-queue-with-10-places-and-add-a-new-value-every-day/83472)._
