Update: JSON.stringify() to pass object in function