I'm planning to get the index of an object is it possible?
for example:
categories = {
'1':{code:'HW', name:'Hardware'},
'2':{code:'SW', name:'Software'},
'3':{code:'OS', name:'Office Supplies'},
}
I want to get the index of software if I use indexOf it gives me an error which is indexOf is not a function because it's a list of objects.
Is it possible top begin with?
Here's a sample fiddle for you guys to check: https://jsfiddle.net/50wL7mdz/86966/
thanks in advance
categoriesis an array and not an object. Which is it in your actual case?