json_decode () works. The second parameter turns the result into an array:
var_dump(json_decode('[{"a":"b"},{"c":"d"},{"e":"f"}]', true)); // gives array(3) { [0]=> array(1) { ["a"]=> string(1) "b" } [1]=> array(1) { ["c"]=> string(1) "d" } [2]=> array(1) { ["e"]=> string(1) "f" } }
source share