topic description
the interface values obtained from the backend are dynamic, and the values of id and name are dynamic. The format of json is as follows, to give a simple example:
var arr = [
{id:1,name:2},
{id:2,name:13},
{id:3,name:2},
{id:10,name:2}
];
now, the final effect I need to get based on the same name is as follows:
arr1 = [{id:2,name:13}]
arr2 = [
{id:1,name:2},
{id:3,name:2},
{id:10,name:2}
]
that means you need to split an array with different name; an array with the same name value;
ask your bosses to help you solve it?