The simplest approach to check if something is a dictionary in Javascript in a way that will not also return true when given an array is:
if (a.constructor == Object) {
// code here...
}
This was inspired by the answer here.
The simplest approach to check if something is a dictionary in Javascript in a way that will not also return true when given an array is:
if (a.constructor == Object) {
// code here...
}
This was inspired by the answer here.