How do I add a new item or object to an existing object? I'm using the Imager plugin and Craft for image compression. 

Currently, I have something like this: 

{% set imagerConfig = { jpegQuality: 80, pngCompressionLevel: 4 } %} 


In another part of my code, I want to do something like: 

 {% set largeLogo = craft.imager.transformImage((logo.getUrl('LargeLogo')), imagerConfig) %}


Where I want to do something like this to imagerConfig above: 

{% set width = {width: 1000} %} or {%set widthRatio = {width: 1000, ratio: 4/2} %}
imagerConfig.Add(width) //what's the proper syntax for adding an item or even another object(like widthRatio above) to imagerConfig here?
When you use the Twig curly brace {}, key/value pair syntax like you've got imagerConfig set to, you're using the Twig hash literal.

In Twig, if you want to add to an array or hash after it has already been created, you can use the merge filter.

Something like this should do what you're looking for:

{% set imagerConfig = { jpegQuality: 80, pngCompressionLevel: 4 } %}

{% set width = { width: 1000 } %}

{% set imagerConfig = imagerConfig|merge(width) %}

{% set largeLogo = craft.imager.transformImage((logo.getUrl('LargeLogo')), imagerConfig) %}