# Get all contents of any Thing

**URL:** <https://forum.solidproject.org/t/get-all-contents-of-any-thing/6494>\
**Category:** General Discussion\
**Created:** [April 7, 2023, 8:16pm UTC](https://forum.solidproject.org/t/get-all-contents-of-any-thing/6494 "2023-04-07T20:16:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaz009](https://avatars.discourse-cdn.com/v4/letter/g/a5b964/32.png) [@gaz009](https://forum.solidproject.org/u/gaz009)\
**Post date:** [April 7, 2023, 8:16pm UTC](https://forum.solidproject.org/t/get-all-contents-of-any-thing/6494/1 "2023-04-07T20:16:45Z")

</div>

Hello all,

I am working on a project and wanted to know what is the easiest way to get all the triples out of any given Thing in a generic format using the Inrupt client libraries. If anyone has a recommendation, thanks.

Thanks

---

<div class="post-metadata">

**Author:** ![Vincent](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@Vincent](https://forum.solidproject.org/u/Vincent)\
**Post date:** [April 7, 2023, 10:43pm UTC](https://forum.solidproject.org/t/get-all-contents-of-any-thing/6494/2 "2023-04-07T22:43:30Z")

</div>

The [`toRdfJsDataset`](https://docs.inrupt.com/developer-tools/api/javascript/solid-client/modules/rdfjs.html#tordfjsdataset) function can give you [an RDF/JS Dataset](https://rdf.js.org/dataset-spec/) containing all Triples in a SolidDataset, which is fairly generic.

If you want just the Triples from a single Thing, you can either create a SolidDataset with just that thing:

```js
const thingSolidDataset = setThing(createSolidDataset, thingToExport);
// You can now call toRdfJsDataset(thingSolidDataset)

```

or filter the Triples with the Thing’s Subject from the RDF/JS Dataset:

```auto
// Assuming you've got the RDF/JS Dataset in rdfJsDataset
const thingTriples = rdfJsDataset.match(new NamedNode(asUrl(thing)), null, null, null);

```

You’ll also need a library that implements RDF/JS NamedNodes for that last option.
