I want to examine the parts of the array that are objects. What if it checks a value and filters it for me if it exists?
im array :
[ {description: null
drive_slots: (4) ['82:17', '82:18', '82:20', '82:22']
drive_type: "HDD"
id: 577569},
{description: null
drive_slots: (8) ['82:8', '82:9', '82:10', '82:11', '82:12', '82:13', '82:14', '82:15']
drive_type: "HDD"
id: 577553
interface_type: "SAS"},
{description: null
drive_slots: (5) ['82:0', '82:1', '82:2', '82:3', '82:4']
drive_type: "SSD"
id: 577543
interface_type: "SATA"}]
if (props.driveData) {
props.driveData.map(item => {
return drive_slots.push(item)
})
console.log("???", drive_slots);
if (drive_slots) {
const drive_filter = drive_slots.filter((drive) => (drive.drive_slots === ('82:17','82:4')));
console.log("drive_filter>>>", drive_filter);
}
}