Comment
OlaN
Tera Sage

Great post! I will use this one.

Two questions though, should there not be a dot after variables?
What does the bracket notation mean in this case, is variables an array of objects?

  inputs.requested_item.variables[inputs.variable_name] = inputs.variable_value;
//                  like this -->
  inputs.requested_item.variables.[inputs.variable_name] = inputs.variable_value;