I have an id auto incrementing (DFL_WER_101, DFL_WER_102 ,DFL_WER_103). I am trying to find a js function sort of like startWith(), but basically I want to select all field starting with DFL_WER_ no matter the number
You can use Array.prototype.filter() combined with String.prototype.startsWith():
const data = ['DFL_WER_101', 'DFL_WER_102', 'DFL_WER_103', 'ASDF_10000000000']
const result = data.filter(s => s.startsWith('DFL_WER_'))
console.log(result)