For parsing json could come in handy :)
isArrayHashs = (attr) ->
!!attr && attr.constructor == Array && isHash(attr[0])
isHash = (attr) ->
!!attr && !$.isNumeric(attr) && attr.constructor == Object
attr[0].constructor must be:
- String
- Numeric
- Array
- Object
- Undefined