logo
pub fn dict(_state: &State<'_, '_>, value: Value) -> Result<Value, Error>
This is supported on crate feature builtins only.
Expand description

Creates a dictionary.

This is a convenient alternative for a dictionary literal. {"foo": "bar"} is the same as dict(foo="bar").

<script>const CONFIG = {{ dict(
  DEBUG: true,
  API_URL_PREFIX: "/api"
)|tojson }};</script>