I have an Array of Items. Each Item in the Array, has a set of Properties. One of them is called config: object[]
. It is an array of Objects.
Normally, I provide the full object with the correct config
array of objects, but for some of my tests, I want to pass different config options. For example wrong config array
, empty array
etc..
Here is my code:
const connectionResources = [Array.forEach(object => object.config === [])]
connectionResources.forEach(builtInOptions => console.log(builtInOptions))
This is what I tried. I tried to spread the Array, but no luck there as well.
Can someone help me a little bit here? I basically want my Array of Objects to have an empty config array property instead of the original object.. How to do that?