- defp do_transform(value) when is_map(value) do
- values =
- for {key, val} <- value,
- into: [],
- do: {String.to_atom(key), do_transform(val)}
-
- Enum.sort(values)
+ defp do_transform(%{"tuple" => [":dispatch", [entity]]}) do
+ cleaned_string = String.replace(entity, ~r/[^\w|^{:,[|^,|^[|^\]^}|^\/|^\.|^"]^\s/, "")
+ {dispatch_settings, []} = Code.eval_string(cleaned_string, [], requires: [], macros: [])
+ {:dispatch, [dispatch_settings]}