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

**URL:** <https://discourse.devontechnologies.com/t/javascript-using-whose-with-type-does-not-what-i-expect/65812>\
**Category:** Automation\
**Created:** [July 25, 2021, 3:58pm UTC](https://discourse.devontechnologies.com/t/javascript-using-whose-with-type-does-not-what-i-expect/65812 "2021-07-25T15:58:59Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)\
**Post date:** [August 6, 2021, 2:18pm UTC](https://discourse.devontechnologies.com/t/javascript-using-whose-with-type-does-not-what-i-expect/65812/13 "2021-08-06T14:18:28Z")

</div>

> [@chrillek](#):
>
> Now I’m wondering: what is `contents()` in a database (given that it inherits from records?) and what is `parents()` in a database? If I could nest databases, I’d understand the `parent` concept, but I don’t think I can (nest them, that is).

`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`.

---

_[View the full topic](https://discourse.devontechnologies.com/t/javascript-using-whose-with-type-does-not-what-i-expect/65812)._
