• Resolved Darius

    (@darius89)


    Is there any way to get the data for custom taxonomies back as array[] instead of an object{}? This would help a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andrew MAGIK

    (@magikru)

    It has no sens. If you wish to have all taxonomies as one array – you should manually convert received object into array:
    let arr = Object.values(res).flat();

    Thread Starter Darius

    (@darius89)

    Hmm ok..thanks. I converted the first one, but the problem is that the objects can nest 3 levels deep. It’s really annoying to use object.keys all the time.

    Example (filterData is already converted from object to array):

    View post on imgur.com

    Perhaps got a quick fix for this in React/Javascript?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get data back as array’ is closed to new replies.