# Reading Stroke Color property inside Each

**URL:** <https://forums.fusetools.com/t/reading-stroke-color-property-inside-each/6266>\
**Category:** How-to Discussions\
**Created:** [December 30, 2017, 12:30pm UTC](https://forums.fusetools.com/t/reading-stroke-color-property-inside-each/6266 "2017-12-30T12:30:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lama226487](https://avatars.discourse-cdn.com/v4/letter/l/f14d63/32.png) [@lama226487](https://forums.fusetools.com/u/lama226487)\
**Post date:** [December 30, 2017, 12:30pm UTC](https://forums.fusetools.com/t/reading-stroke-color-property-inside-each/6266/1 "2017-12-30T12:30:00Z")

</div>

Hey everyone,  
I’m trying to change the Rectangle Stroke Color by binding it to an object key inside Each.  
my code looks like this:  
1- Each code:

 ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/ZU4Y4p5W0DKT-image-1514636694998.png)

2- the paymentMethods contents:

![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/0MtkSJn2UzNa-image-1514636756869.png)

3- the function that changes the PayColor value:

![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/rzcunMLmUGNs-image-1514636794632.png)

when i click on any of the items, the PayColor key actually is updated from White to the new color and in the console.log result:  
[{“name”:“test1”,“icon”:“[https://www.iconsdb.com/icons/preview/green/visa-xxl.png",“chosen”:false,“PayColor”:“White”},{“name”:“test2”,“icon”:“https://www.iconsdb.com/icons/preview/green/atm-xxl.png”,“chosen”:“True”,“PayColor”:"#008C50"},{“name”:“test3”,“icon”:“https://www.iconsdb.com/icons/preview/green/banknotes-xxl.png”,“chosen”:false,“PayColor”:"White](https://www.iconsdb.com/icons/preview/green/visa-xxl.png%22,%22chosen%22:false,%22PayColor%22:%22White%22%7D,%7B%22name%22:%22test2%22,%22icon%22:%22https://www.iconsdb.com/icons/preview/green/atm-xxl.png%22,%22chosen%22:%22True%22,%22PayColor%22:%22#008C50%22%7D,%7B%22name%22:%22test3%22,%22icon%22:%22https://www.iconsdb.com/icons/preview/green/banknotes-xxl.png%22,%22chosen%22:false,%22PayColor%22:%22White)”}]

but it had no effect in the ux, and it stayed White as the original value.

I spent a long time trying many alternatives. any hints to know what i did wrong :’( ?

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [January 2, 2018, 9:38am UTC](https://forums.fusetools.com/t/reading-stroke-color-property-inside-each/6266/2 "2018-01-02T09:38:01Z")

</div>

A better approach would be to just toggle a boolean in JavaScript, and leave changing the color to UX code. [Selection API](https://www.fusetools.com/docs/fuse/selection/selection) sounds a lot like the right tool for the job in this case.

---

<div class="post-metadata">

**Author:** ![lama226487](https://avatars.discourse-cdn.com/v4/letter/l/f14d63/32.png) [@lama226487](https://forums.fusetools.com/u/lama226487)\
**Post date:** [January 2, 2018, 5:32pm UTC](https://forums.fusetools.com/t/reading-stroke-color-property-inside-each/6266/3 "2018-01-02T17:32:28Z")

</div>

to be honest,i did not know that Selection exists.  
thanks alot again.
