# Display Tuple in React frontend

**URL:** <https://forum.canton.network/t/display-tuple-in-react-frontend/4730>\
**Category:** App Development\
**Tags:** react\
**Created:** [June 14, 2022, 1:45pm UTC](https://forum.canton.network/t/display-tuple-in-react-frontend/4730 "2022-06-14T13:45:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frankie](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/frankie/32/646_2.png) [@Frankie](https://forum.canton.network/u/Frankie)\
**Post date:** [June 14, 2022, 1:45pm UTC](https://forum.canton.network/t/display-tuple-in-react-frontend/4730/1 "2022-06-14T13:45:44Z")

</div>

I defined a Tuple in the Daml code

> aType : (Party, Party)

How can I display it in frontend react config file (frontend-config.js)? For primitive types, I can use

> x =\> x.argument.fields[0].value.value

But It doesn’t work for Tuple. I also got problem with Set. Any ideas? Thanks.

---

<div class="post-metadata">

**Author:** ![rikotacards](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@rikotacards](https://forum.canton.network/u/rikotacards)\
**Post date:** [June 14, 2022, 4:01pm UTC](https://forum.canton.network/t/display-tuple-in-react-frontend/4730/2 "2022-06-14T16:01:53Z")

</div>

Hey Frankie, can you provide a bit more detail on this? There are types exported from “@damly/types”  
For example  
`import { ContractId, Party, List } from "@daml/types";`  
If I need a ContractId type for my typescript file, I can do the above.

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [June 14, 2022, 5:21pm UTC](https://forum.canton.network/t/display-tuple-in-react-frontend/4730/3 "2022-06-14T17:21:57Z")

</div>

Daml tuples are translated into [records with fields \_1, …, \_n](https://docs.daml.com/app-dev/daml-lf-translation.html#tuple-types). Navigator uses the JSON encoding used in the JSON API, so you should end up with a JSON object with those fields. For Set, take a look at [REST JSON Specification - #4 by Gary\_Verhaegen](https://discuss.daml.com/t/rest-json-specification/2429/4).

That said, I would recommend against using the custom frontend config in Navigator. It is very limited and we have no plans to extend it. If you need a custom frontend you are better off building something using the Javascript bindings. `create-daml-app` is often a good starting point.

---

<div class="post-metadata">

**Author:** ![Frankie](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/frankie/32/646_2.png) [@Frankie](https://forum.canton.network/u/Frankie)\
**Post date:** [June 17, 2022, 12:42pm UTC](https://forum.canton.network/t/display-tuple-in-react-frontend/4730/4 "2022-06-17T12:42:46Z")

</div>

Thanks guys. I was trying to upgrade a very old POC and keep the old Navigator react configuration. I found a way to hack it which is to use JSON.Strigify() to print the JSON structure and then get to the field I need.
