# Given a participants.json from project:DABL, how do I get my party in Daml Script?

**URL:** <https://forum.canton.network/t/given-a-participants-json-from-project-dabl-how-do-i-get-my-party-in-daml-script/1827>\
**Category:** App Development\
**Tags:** daml\
**Created:** [December 18, 2020, 3:40pm UTC](https://forum.canton.network/t/given-a-participants-json-from-project-dabl-how-do-i-get-my-party-in-daml-script/1827 "2020-12-18T15:40:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bernhard](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bernhard/32/356_2.png) [@bernhard](https://forum.canton.network/u/bernhard)\
**Post date:** [December 18, 2020, 3:40pm UTC](https://forum.canton.network/t/given-a-participants-json-from-project-dabl-how-do-i-get-my-party-in-daml-script/1827/1 "2020-12-18T15:40:46Z")

</div>

I’ve downloaded the `participants.json` from DABL, which contains something akin to what’s shown in [https://docs.daml.com/daml-script/index.html#using-daml-script-in-distributed-topologies](https://docs.daml.com/daml-script/index.html#using-daml-script-in-distributed-topologies).

```haskell
      "party_participants": {
        "ledger-party-abc123": "bernhard",
        "public-ledgerid": "public"
    }

```

However, there are dozens and dozens of other parties on my ledger. All have displayName=party and all have isLocal=True.

Is there any way in Daml Script to get my hands on my ledger party without passing in its Party Id or hardcoding it in my script?

---

<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:** [December 18, 2020, 6:11pm UTC](https://forum.canton.network/t/given-a-participants-json-from-project-dabl-how-do-i-get-my-party-in-daml-script/1827/2 "2020-12-18T18:11:41Z")

</div>

On most ledgers you can call `listKnownParties` and then get the party with the given display name (note that uniqueness of display names is not guaranteed by the ledger so you have to ensure that yourself). However, DABL does not (yet) implement that endpoint I believe so this unfortunately doesn’t work.

This leaves passing the party id in from the outside as your only option. Assuming the participant names in the config generated by DABL correspond to display names, you could use `jq` to go from `participants.json` to a map of display names to party ids:

```haskell
> echo '{"party_participants": {"a-id": "a", "b-id": "b"}}' | jq ".party_participants | to_entries | map( {(.value) : .key } ) | add"
{
  "a": "a-id",
  "b": "b-id"
}

```

You can then use a `TextMap Party` as the input your DAML Script and index that by display name to get the corresponding party id.
