You can use json_decode()
php function.
$json_string = '[{"id_piesa":"8","cantitate_piesa":"12","garantie_piesa":false},{"id_piesa":"30","cantitate_piesa":1,"garantie_piesa":true}]';
$array = json_decode( $json_string , TRUE);
print_r( $array);
Output:
Array
(
[0] => Array
(
[id_piesa] => 8
[cantitate_piesa] => 12
[garantie_piesa] =>
)
[1] => Array
(
[id_piesa] => 30
[cantitate_piesa] => 1
[garantie_piesa] => 1
)
)
if you add TRUE as second argument the returned objects will be converted into associative arrays.
Here you can find the complete documentation.