title: dynamically push object into nested array based on key,value pair condition
body: <p>I have the following object:</p>
  <pre><code>{type=stuff, name=blablabla, variableId=x, fingerprint=xxxx, containerId=xxxx, accountId=xxxx, workspaceId=xxx, path=accounts/xxxx/containers/xxxx/workspaces/xx/variables/x, parentFolderId=x, parameter=[{value=auto, type=template, key=xxxxx}, {type=boolean, key=asdasdf, value=false}, {value=false, type=boolean, key=adasdasd}, {type=boolean, value=false, key=asdasdasd}, {type=list, key=fieldsToSet, list=[{map=[{value=asdasdas, type=template, key=asdasdas}, {value=asdasdas, type=template, key=value}], type=map}, {type=map, map=[{type=template, value=page, key=fieldName}, {type=template, key=value, value=asdasdasd}]}]}, {value=false, type=boolean, key=asdasd}, {type=boolean, value=false, key=asdasdasd}, {value=false, type=boolean, key=adasdasd}, {key=dimension, type=list, list=[{type=map, map=[{value=2, key=index, type=template}, {value=asdasd, type=template, key=dimension}]}, {type=map, map=[{value=3, type=template, key=index}, {value=asdasdasd, type=template, key=dimension}]}, {map=[{type=template, value=4, key=index}, {key=dimension, type=template, value=asdasdasd / asdasdasd}], type=map}, {map=[{type=template, value=5, key=index}, {value=asdasd, type=template, key=dimension}], type=map}, {type=map, map=[{value=6, type=template, key=index}, {key=dimension, type=template, value=asdasdasd}]}, {map=[{type=template, key=index, value=7}, {value=asdasd, type=template, key=dimension}], type=map}, {type=map, map=[{key=index, value=8, type=template}, {value=asdasdasd, key=dimension, type=template}]}]}, {key=enableEcommerce, type=boolean, value=false}, {value=asdasdasd, type=template, key=asdasdasd}], tagManagerUrl=https://blabla.com/#/asdasd/accounts/asdasd/containers/xxxxx/workspaces/xxxx/variables/x?apiLink=variable}
  </code></pre>
  <p>I want to modify it and add this object <code>{type=map, map=[{key=fieldName, value=cookieExpires, type=template}, {key=value, value=33696000, type=template}]}</code> into the nested object with the key <code>fieldsToSet</code>.</p>
  <p>So far I've tried something like this but it doesn't work:</p>
  <pre><code>element.parameter.filter(obj =&gt; { return obj.key === &quot;fieldsToSet&quot; }).push(newObject);
  </code></pre>
  <p>I need something dynamic as the number of object and arrays always change.</p>