how decode it with php
$myjson = [{"type":"laser","material":"1","quantity":1000},
{"type":"motors","material":"1","quantity":1491477212},
{"type":"shield","material":"1","quantity":1491531189},
{"type":"hp","material":"1","quantity":1491531201}] ;
how decode it with php
$myjson = [{"type":"laser","material":"1","quantity":1000},
{"type":"motors","material":"1","quantity":1491477212},
{"type":"shield","material":"1","quantity":1491531189},
{"type":"hp","material":"1","quantity":1491531201}] ;
check this code, you missed "'" in start and end "'". i have format it now you can use this code
<?php
$myjson = '[{"type":"laser","material":"1","quantity":1000},{"type":"motors","material":"1","quantity":1491477212},{"type":"shield","material":"1","quantity":1491531189},{"type":"hp","material":"1","quantity":1491531201}]' ;
$array = json_decode($myjson);
echo "<pre>";
print_r($array);