I am having a object called ItemData which consists of other properties. I would like to extract only the numbered items from it. below is the body of ItemData. I have tried using map but it throws error says ItemData is an object. I can use item[0] and item[1] but there are going to be many arrays in the object. Is there a structure way to extract 0 and 1 items.
ItemData
{
0: { "daysIn": "2", "daysOut": "3", "category": "Day Shift" },
1: { "daysIn": "5", "daysOut": "6", "category": "Day Shift" },
type: "Fixed Multiple",
Status: "Active"
}
'0'and'1'are just object keys, not array indexes. You could look for all keys that are numbers and build an array based on that.