Change array to json when returning a product info