Skip to content

Twig Extension, Symfony implementation for the json_decode function.

License

Notifications You must be signed in to change notification settings

keganv/twig-json-decode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twig Json Decode Filter

Twig Extension, Symfony implementation for the json_decode function.

  1. Create the Twig\Extension directories within your bundle (in this case we are using the default AppBundle).
  2. Create JsonDecode.php class
  3. Tell the container to add the service by adding the new class to your services.yml
  4. Use the new filter in any twig file!

example.twig.html

{{ data|json_decode }}

About

Twig Extension, Symfony implementation for the json_decode function.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published