Sample code for filtering arrayvalues

The code will not work unless you add the critical lines.