Converts an Array into a JSON string
Converts an Array into a JSON string
json_encode
{{$json = "Array"|json_encode}}
json_encode
{{$data = ["First"=> "Angelo","Last"=>"Kleij","Email"=>"tpm@deployteq.com"]}}
{{$encoded = $data|json_encode}}
{{$data|print_r}}
{{$encoded|print_r}}
Output:
Array ( [First] => Angelo [Last] => Kleij [Email] => tpm@deployteq.com )
{"First":"Angelo","Last":"Kleij","Email":"tpm@deployteq.com"}