Search the Community
Showing results for tags 'foreach'.
Hello, I am having problems wrapping my head around nesting a forEach method within a .map .filter method. I have two arrays.. buttons: that contains key value pairs of button display statuses. eleColor: contains values that will be filtered through "buttons.disp" key values. I am using .map.filter methods to create a new array. When I assign the "disp" value statically all works and the new array is created. But when I try to iterate through eleColor for the parameter the code fails. Any recommendations on correct syntax or a better method to filter values from a different array