[php] json to array

Viewer

copydownloadembedprintName: json to array
  1. array (
  2.   0 => 
  3.   array (
  4.     'product_id' => 300,
  5.     'option_id' => 560,
  6.     'options' => 
  7.     array (
  8.       'id' => 560,
  9.       'type' => 'radio',
  10.       'is_required' => false,
  11.       'is_global' => false,
  12.       'position' => 0,
  13.       'deleted_at' => NULL,
  14.       'created_at' => '2020-12-15T02:00:22.000000Z',
  15.       'updated_at' => '2020-12-15T02:00:22.000000Z',
  16.       'name' => 'COLOR',
  17.       'translations' => 
  18.       array (
  19.         0 => 
  20.         array (
  21.           'id' => 560,
  22.           'option_id' => 560,
  23.           'locale' => 'en',
  24.           'name' => 'COLOR',
  25.         ),
  26.       ),
  27.       'values' => 
  28.       array (
  29.         0 => 
  30.         array (
  31.           'id' => 914,
  32.           'option_id' => 560,
  33.           'price' => 
  34.           array (
  35.             'amount' => '8900.00',
  36.             'formatted' => 'Rs. 8900.00',
  37.             'currency' => 'PKR',
  38.             'inCurrentCurrency' => 
  39.             array (
  40.               'amount' => 8900,
  41.               'formatted' => 'Rs. 8900',
  42.               'currency' => 'PKR',
  43.             ),
  44.           ),
  45.           'special_price' => NULL,
  46.           'stock' => NULL,
  47.           'model_number' => 'EM-2023BSM',
  48.           'picture' => 'options/1608026527-EM2023Front2.png',
  49.           'additional_pictures' => NULL,
  50.           'price_type' => 'fixed',
  51.           'position' => 0,
  52.           'created_at' => '2020-12-15T02:00:22.000000Z',
  53.           'updated_at' => '2020-12-15T05:02:07.000000Z',
  54.           'deleted_at' => NULL,
  55.           'label' => 'Black',
  56.           'translations' => 
  57.           array (
  58.             0 => 
  59.             array (
  60.               'id' => 912,
  61.               'option_value_id' => 914,
  62.               'locale' => 'en',
  63.               'label' => 'Black',
  64.             ),
  65.           ),
  66.         ),
  67.         1 => 
  68.         array (
  69.           'id' => 915,
  70.           'option_id' => 560,
  71.           'price' => 
  72.           array (
  73.             'amount' => '8900.00',
  74.             'formatted' => 'Rs. 8900.00',
  75.             'currency' => 'PKR',
  76.             'inCurrentCurrency' => 
  77.             array (
  78.               'amount' => 8900,
  79.               'formatted' => 'Rs. 8900',
  80.               'currency' => 'PKR',
  81.             ),
  82.           ),
  83.           'special_price' => NULL,
  84.           'stock' => NULL,
  85.           'model_number' => 'EM-2023WSM',
  86.           'picture' => 'options/1608026527-EM2023BSM.png',
  87.           'additional_pictures' => NULL,
  88.           'price_type' => 'fixed',
  89.           'position' => 1,
  90.           'created_at' => '2020-12-15T02:00:22.000000Z',
  91.           'updated_at' => '2020-12-15T05:02:07.000000Z',
  92.           'deleted_at' => NULL,
  93.           'label' => 'White',
  94.           'translations' => 
  95.           array (
  96.             0 => 
  97.             array (
  98.               'id' => 913,
  99.               'option_value_id' => 915,
  100.               'locale' => 'en',
  101.               'label' => 'White',
  102.             ),
  103.           ),
  104.         ),
  105.       ),
  106.     ),
  107.   ),
  108. )

Editor

You can edit this paste and save as new:


File Description
  • json to array
  • Paste Code
  • 23 Jun-2021
  • 2.93 Kb
You can Share it: