Convert action returns of array and object to json