[Solved] How to get the inner object array in javascript?


Based on your requirement, this should work!

  var newObj = [];
  for (let i of object) {
                for (let j of Object.values(i)) {
                    if (Array.isArray(j)) {
                        newObj = [...newObj, ...j]
                        console.log(newObj)
                    }
                }
            }

Another Shorter approach :

 newObj = []
            object.forEach(x =>{
                 Object.values(x).filter(y => {
                     if(Array.isArray(y)) newObj = [...newObj, ...y]
                 } )
            })

solved How to get the inner object array in javascript?