Cannot Read Properties Of Undefined

[Solved] Cannot Read Properties Of Undefined | Actionscript - Code Explorer | yomemimo.com
Question : Cannot read properties of undefined

Answered by :

const Data = {	"a": {	"name": "Steve",	"car": ["lamborghini", "nissan"]	},	"b": {	"name": "Alex",	// "car": ["cadillac", "dodge"]	}
};
const DataSearch = (item, searchString) => Object.keys(Data).map(id => {	if (Data[id][item].indexOf(searchString) >= 0) return id;
}).filter(v => v);
console.log(playerDataSearch("car", "lamborghini"));
// Uncaught TypeError: Cannot read properties of undefined (reading 'indexOf')

Source : | Last Update : Fri, 02 Sep 22

Answers related to cannot read properties of undefined

Code Explorer Popular Question For Actionscript