[Solved] Creating json data with duplicate keys [closed]


PHP comes with a JSON extension. The only thing you will need to figure out is how you have to create the data in PHP. [] in JSON is an array, {} is a dictionary. For the part mentioned you’ll need something like this:

$foo = array(
   array(
      'c' => array(
         array('v' => 'date3'),
         array('v' => 52)
      )
   ),
   array(
      'c' => array(
         array('v' => 'date4'),
         array('v' => 32)
      )
   ),
   // and so on...
);

solved Creating json data with duplicate keys [closed]