implements json array filtering.