I have an array of ID\'s as below:
[121, 432, 322]
I want all of it to be added to an array in the following format (Expected Outpu
While this answer explained the problem of your code. Here is my way to solve the same problem.
const input = [121, 432, 322]; Array.from(input, brand_id => ({ term: { brand_id }}))