I have javascript array like this
let attributeSet = [
{
"name" : "Capacity",
"value" : "1 TB",
"id" : 3
},
{
"name" : "Form Factor",
"value" : "5 inch",
"id" : 4
},
{
"id" : 5,
"name" : "Memory Components",
"value" : "3D NAND",
}
]
The format should be in id-value pair. Also the order of id should be in increasing order. Like this
output = 3-1 TB | 4-5 inch | 5-3D Nand
Can anyone help?