split into:
```
static VarRef* LookupAndQualifyByName(const FnCall *fp, const char *varname)
static JsonElement* VarRefToJson(EvalContext *ctx, const FnCall *fp, VarRef *ref, const DataType disallowed_datatypes[])
```

I need the context in `VarRefToJson` for the value = `EvalContextVariableGet(ctx, ref, &value_type);`