Basically json_decode () returns two data types.
1) Object 2) Associative array
By default, json_decode () returns an object type value.
But, if you want the value as an array format, you must use TRUE as the second argument in json_decode ().
eg,
$decoded_value = json_decode($json_encoded_value, TRUE);
Manish chauhan
source share