i am trying to use a listfind in the loop where th...
# javascript
s
i am trying to use a listfind in the loop where the following should appen
Copy code
return this.system.filter(function (item, key) {
        if(key.)
      });
what ia m tryin to chhieve , if the key is: 1,2,3,4,5 it should be equal to 9 and it should also exclude key 7 from the list, i know in cf we can do listfind but i am nt sure in javascript
m
Please start with a JSFiddle https://jsfiddle.net/ Gist showing what you are trying to do. To make it a good test have your exact inputs your entering in and what you are expecting out. Going through the process of simplifying your problem will 9 times out of 10 lead you to the solution you are asking about.
s
basically the purpose is to show the items in a dropdown but i want to hide the items from 1 to 5 in the dropdown and make sure the value of 1 to 6 is always set to 9, so i can send A to the server. i have added the code in the jsfiddle i am trying to use filter but i am sure i do not need filter, probaly i need a loop whre i can hide those values and set the value to 9 because at the end they will select label https://jsfiddle.net/pvx9hboj/
m
your
this.system
array in your fiddle is invalid. There are an odd number of quotes on each line.