Hello, my dear! \o
In fact, keeping too many variables can compromise performance.
One thing that can be done, for example, is… when receiving an API return, use SpinJson to work with the JSON object and then access its properties one by one through the “.prop()
” method.
Imagine that you made a call to a “Registration” API, and received a response in which you would save each response data in a process variable, for example “name”, age.
Instead of saving it in separate variables, you would output a single response variable for this API, for example “registrationResponse”, which would return a complete JSON object.
For this you must put in the “Connector Output” this:
In the “Process variable name
” field: registrationResponse
${S(response)}
And in the registrationResponse variable you received the following JSON below for example:
{
"data":{
"process":{
"variables":[
{
"name":"William",
"age": 33
}
]
}
},
"result":{
"code":"200",
"info":"OK"
}
}
So if somewhere else in your project you need access to variables you’ll do this:
var name = registrationResponse.prop("data").prop("process").prop("variables").prop("name").stringValue();
and then you will already have the value of “name” only within that scope and not as a new process variable, as the value will be within a single variable that will be your registrationResponse.
I don’t know if I understood your question correctly, but I think that’s it.
If not, you can contact us again 
Cya.
William Robert Alves