How to extract and merge multiple arrays from an array of object containing the array of interest?

 https://stackoverflow.com/questions/53149174/how-to-extract-and-merge-multiple-arrays-from-an-array-of-object-containing-the


You don't need flat function. You can use native array method.

data.reduce((acc: any, cur: any) => {
  return acc.concat(cur.subCategories.map((v: any) => v.label));
}, []);

Không có nhận xét nào:

Is it okay to use both fetchpriority="high" and loading="eager" in img tag?

 https://stackoverflow.com/questions/77744344/is-it-okay-to-use-both-fetchpriority-high-and-loading-eager-in-img-tag Yes Fetchpriority and l...