JavaScript: using whose with "type =" does not what I expect

contents: All documents inside a database
parents: All containers (e.g. groups, tags or feeds) in a database
records: Basically identical to children of root.