Skip to content Skip to footer navigation

Is Json Modifier

Returns true if string is valid json

data: '{"book": "All The Places You'll Go"}'
{{ if data | is_json }}
@if (Statamic::modify($data)->isJson()->fetch()) ... @endif
true