# Multiple values with same subject and predicate

**URL:** <https://forum.solidproject.org/t/multiple-values-with-same-subject-and-predicate/2505>\
**Category:** Solid App Development FAQs\
**Created:** [December 17, 2019, 12:15pm UTC](https://forum.solidproject.org/t/multiple-values-with-same-subject-and-predicate/2505 "2019-12-17T12:15:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michielbdejong](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/michielbdejong/32/195_2.png) [@michielbdejong](https://forum.solidproject.org/u/michielbdejong)\
**Post date:** [December 17, 2019, 12:15pm UTC](https://forum.solidproject.org/t/multiple-values-with-same-subject-and-predicate/2505/1 "2019-12-17T12:15:14Z")

</div>

Suppose I want to create the following document:

```auto
<s1> <p1> <o1> .
<s1> <p1> <o2> .

```

I know TripleDoc has a distinction between [https://vincenttunru.gitlab.io/tripledoc/docs/api/interfaces/triplesubject.html#addref](https://vincenttunru.gitlab.io/tripledoc/docs/api/interfaces/triplesubject.html#addref) and [https://vincenttunru.gitlab.io/tripledoc/docs/api/interfaces/triplesubject.html#setref](https://vincenttunru.gitlab.io/tripledoc/docs/api/interfaces/triplesubject.html#setref)  
so I would use addRef in this case, and call it twice.

Is something like that also possible in LDFlex?

---

<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:** [December 17, 2019, 12:19pm UTC](https://forum.solidproject.org/t/multiple-values-with-same-subject-and-predicate/2505/2 "2019-12-17T12:19:06Z")

</div>

Although I haven’t explicitly tried it, peeking at [my cheatsheet](https://vincenttunru.gitlab.io/tripledoc/docs/cheatsheet#ldflex-3) I think the following would work:

```auto
import data from "@solid/query-ldflex";
import { namedNode } from "@rdfjs/data-model";

const subject = data['s1'];
await subject['p1'].add(namedNode('o1'));
await subject['p1'].add(namedNode('o2'));

```

Note that that would perform two HTTP requests, one for every property.

(I’m assuming that `s1`, `p1` and `o1` and `o2` would be replaced by actual URLs.)
