0

I am just figuring out this issue and want to see if anyone knows how to deal with this. I have an array with a nested property called children(which is an array of arrays). I would like to know if there is any way I can extract the objects within the array and have it pushed into a new array.

Here is my code:

  const getCities = () => {
    const result = menus.locations;
    console.log(result)
  }

And here is the image of what I have from the console log of that code:

enter image description here

Jim Jones
  • 31
  • 5
  • 1
    Welcome to Stack Overflow! Please take the [tour], have a look around, and read through the [help], in particular [*How do I ask a good question?*](/help/how-to-ask) Please post code, error messages, markup, data structures, and other textual information **as text**, not just as a *picture* of text. Why: http://meta.stackoverflow.com/q/285551/157247 – T.J. Crowder Jan 18 '23 at 16:33

0 Answers0