You should now get the length of the string, which is 1!
You didn't show your JSON, so we can't guess what you are really trying to do. I'd imagined you had something like this:
[ "first", "second", "third" , 1, 2, 3]
If your server sent that...
notifications[0] -> "first" (string)
notifications[3] -> 1 (integer)
notifications.length -> 6 (integer - length of the array)
notifications[0].length -> 5 (integer - length of the string "first")
notifications[3].length -> undefined, as numbers are a primitive type, not an object. Numbers don't have a .length method.