Can't read files in scratch directory from lua

Hi,
I have a service that writes a json file to the scratch directory, however I have not had success reading that file from node.lua.
I have tried:

local json_file_path = SCRATCH .. "/data.json"

util.file_watch(json_file_path, function(content)
    local data = json.decode(content)
    amount = data.amount
    record = data.record
end)

but I receive,

attempt to concatenate global 'SCRATCH' (a nil value)

I have also tried node.make_nested(), passing the direct path to the scratch directory, without success.

How can I correctly read the data.json saved in the scratch directory from Lua?

Have a look at the scratch_mount option in node.json. It symlinks the node’s scratch directory into the node directory with the given name. You can then use node.make_nested() to access it.

Thank you. Now I could :). I had not configured the node.json to create the symlink with scratch_mount.

node.json

{
"scratch_mount": "my_scratch_symlink"
}

Node lua:

local json_file_path = "my_scratch_symlink/data.json"

util.file_watch(json_file_path, function(content)
    local data = json.decode(content)
    monto = data.monto
    registro =data.registro
end)