Array A=["G","D","B","H"], the number of elements is variable, and the element content can be any character
Set B=[{"id":"a",item:""},{"id":"a=b",item:""}], variable quantity, fixed structure
Now we need to distribute the elements in A equally to the items in B. If there are multiple ones, separate them with commas.
When the number of elements of A is less than or greater than the length of B, it only requires that all A appear in B. The items of set B must be allocated to at least one element, preferably evenly, but the set Each item in B cannot have duplicate elements
Is there any easier way?
Already solved