Add method to return search elements as json