Am getting the error .contains() is not a function. Full code is here, probably too much to paste here so here's the relevant bits. Locations is globally set as well as query, then set state in the component.
*edit, o is the individual location, there are 5 titles and long/latitutes from the json file
let locationslist = this.state.locations
.filter(o => o.contains(this.state.query))
.map(o => <li key={o}
type="button"
className="btn"
id="filterMarker"
tabIndex="0">{o}</li>)
render() {
return (
<div>
<div id="filtercontainer">
<input
id="filterbar"
type="text"
placeholder="Filter"
onChange={this.handleQueryChange} value={this.state.query} />
<ul>
{this.state.locationslist}
</ul>
</div>
<div id="map" />
</div>
)
}