sjakathi
5 years agoNew Contributor II
How to Create a subArray from an Array
Hi,
I want to create a 2 sub array from an Array.
Input :
{
“array1”:[
{
“Item”:“Pen”,
“Item Desc”:“Black”,
“Length”: “7”,
“Width”: “2”,
“Weight”:“5”
}
{
“Item”:“Pen”,
“Item Desc”:“Black”,
“Length”: “7”,
“Width”: “2”,
“Weight”:“5”
}
]
}
Output:
{
“Array1”:[
{
“Item”:“Pen”,
“Item Desc”:“Black”,
“Length”: “7”,
“Width”: “2”,
“Weight”:“5”
}
{
“Item”:“Pen”,
“Item Desc”:“Black”,
“Length”: “7”,
“Width”: “2”,
“Weight”:“5”
}
]
“Array2”:[
{
“Item”: “Pen”,
“Item Desc”:“Black”
},
{
“Item”:“Pen”
“Item Desc”:“Red”
}
]
}