filter in react native

JavaScript
data.filter((item) => item.state == 'New York')

const newData = this.state.data.filter((item)=>{
      return item !== 'one';
    })
Source

Also in JavaScript: