# Record argument

**URL:** <https://forum.dfinity.org/t/record-argument/6213>\
**Category:** Developers\
**Tags:** Functional-Programming, candid\
**Created:** [July 30, 2021, 4:36pm UTC](https://forum.dfinity.org/t/record-argument/6213 "2021-07-30T16:36:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gladguy](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gladguy/32/11145_2.png) [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Post date:** [July 30, 2021, 4:36pm UTC](https://forum.dfinity.org/t/record-argument/6213/1 "2021-07-30T16:36:25Z")

</div>

Hello all

How do I call a record argument in motoko with JavaScript

Example

GetBalance ( record { account\_name } )

How I can call this in JavaScript ?  
Thanks

---

<div class="post-metadata">

**Author:** ![cryptoschindler](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/cryptoschindler/32/26_2.png) [@cryptoschindler](https://forum.dfinity.org/u/cryptoschindler)\
**Post date:** [August 13, 2021, 10:50am UTC](https://forum.dfinity.org/t/record-argument/6213/2 "2021-08-13T10:50:02Z")

</div>

> Corresponding JavaScript values  
> If the record type is a tuple, the value is translated to an array, for example, `["Candid", 42]` .  
> Else it translates to a record object. For example, `{ "first name": "Candid", age: 42 }` .  
> If the field name is a hash, we use `_hash_` as the field name, for example, `{ _1_: 42, "1": "test" }` .

From  
[https://sdk.dfinity.org/docs/candid-guide/candid-types.html](https://sdk.dfinity.org/docs/candid-guide/candid-types.html)
