parse response for show search depending on length of array