Filtering view based on search entry

Tried to find something that addressed this but couldn’t find anything. Anyway, am new to Fuse and am trying to change a view (right now just using a simple array).

If I call the function directly using “filterPlaces();” it works fine but trying to set the array based on the search entry doesn’t seem to change the view (even though in the log I can see that it is filtering).

Any help would be hugely helpful - just trying to get the basic concept before I try and hook this up to a real backend.


Array (separate file):

		//var Observable = require("FuseJS/Observable");
		var MyPlaces =  [
				id: 0,
				name: "Alameda",
				address:"195 Franklin Street., Brooklyn",
				image: "img/alameda.jpg",
				postedby: "@angelo",
				comment: "Bar furnishing classy cocktails & elevated American snacks amid eye-catching, tile-&-wood decor.",
				list: ["dive bars ","fav bars in greenpoint", "pasta happy hours"]
				id: 1,
				name: "Capri Social",
				address:"156 Calyer Street, Brooklyn",
				image: "img/capri-social.jpg",
				postedby: "@angelo",
				comment: "The drinks, cheapest in all of Greenpoint and old jukebox in the back of the bar that includes songs by artists as different as Johnny Cash, Queen and Justin Timberlake.",
				list: ["dive bars"]
				id: 2,
				name: "Baby's Alright",
				address:"146 Broadway., Brooklyn",
				image: "img/BabysAllRight.jpg",
				postedby: "@angelo",
				comment: "Cool haunt offering live music most nights, plus gourmet bar fare, creative drinks & weekend brunch.",
				list: ["dive bars","fav bars in greenpoint"]
				id: 3,
				name: "Goldie's",
				address:"195 Franklin Street., Brooklyn",
				image: "img/goldies.jpg",
				postedby: "@angelo",
				comment: "Creative cocktails & full bar offerings served in a sleek space with a Vegas throwback feel.",
				list: ["dive bars","fav bars in greenpoint"]
				id: 4,
				name: "Torst",
				address:"195 Nassau Ave., Brooklyn",
				image: "img/torst.jpg",
				postedby: "@angelo",
				comment: "Hip, wood-clad Danish bar doing boutique beers & a compact food menu.",
				list: ["dive bars","fav bars in greenpoint"]

		module.exports = MyPlaces;


var Observable = require("FuseJS/Observable");
var MyPlaces = require("Modules/MyPlaces");
var filteredPlaces = MyPlaces;
var searchString = Observable("");
function filterPlaces() {
		var places = MyPlaces;
		console.log("inside filter"); 
		console.log("places 1 name = "+places[0].name);
		console.log("places 1 name = "+places[0].neighborhood);
		console.log("places 2 name = "+places[1].name);
		MyPlaces = [];
		for (var i = 0; i < places.length; i++) {
		lower = places[i].neighborhood.toLowerCase();
		if  (lower.includes("will")) {
			console.log("in if ");
    module.exports = {
    //onSearch: onSearch,
    searchString: searchString,
    filterPlaces: filterPlaces 


 <TextInput Value="{searchString}" ActionTriggered="{filterPlaces}" ux:Name="search" PlaceholderText="Search Neighborhood" Font="OpenSansLt" Alignment="Center" PlaceholderColor="#ccc" Height="50" Width="97%" Padding="10" Margin="0,0,0,0" Background="#FFF">
        <Rectangle Layer="Background" CornerRadius="0">
            <Stroke Width="0" Brush="#BBB" />
        <DropShadow Angle="45" Size="1" Distance="1" Spread="0.1" Color="#ccc" />

Each tag is: <Each Items="{MyPlaces}">

I found the answer somewhere else… Filter list of observables