I use zend's JSON helper, and I have a problem... When I use this code :
$this->_helper->json(array(1 => "value 1", 2 => "value 2"));
I get an object:
{1: "value 1", 2: "value 2" }
But if the keys are a sequence beginning by "0", I get an array. For exemple, with :
$this->_helper->json(array(0 => "value 0", 1 => "value 1"));
I get an array:
["value 0", "value 1"]
How can I do to get an object every time I use this method ? (I want the result {0: "value 0", 1: "value 1" } in the second example).