I have a dynamic object something like this
var object = [
"70669",
"70669|9436",
"70669|8353",
"70669|8914",
"70669|9522",
"70669|8422",
"70669|9639"
]
My expected output is something like this
[{
stdSizeCode: [9436, 8353, 8914, 9522, 8422, 9639]
productHierSk: 70669
}]
I have tried to looking into this link and did not work the way that is expected. Can someone please suggest
[ "1", "2|5", "1|2", "2" ], is the output[ { stdSizeCode: [ 2 ], productHierSk: 1 }, { stdSizeCode: [ 5 ], productHierSk: 2 } ]?objectis an array,