I have an array like this
array = [{name: 'John'},{age: 20},[{degree: "any"}, {college: 'any'}]]
I want to change this array into something like this..
array = [{name: 'John'},{age: 20},{degree: "any"}, {college: 'any'}]
variable array is returned from different recursive functions, degree and college is returned from single function as an array of object.