# Getting user profile custom field via JS

**URL:** <https://meta.discourse.org/t/getting-user-profile-custom-field-via-js/32257>\
**Category:** Feature\
**Created:** [August 18, 2015, 5:08pm UTC](https://meta.discourse.org/t/getting-user-profile-custom-field-via-js/32257 "2015-08-18T17:08:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![dleung](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@dleung](https://meta.discourse.org/u/dleung)\
**Post date:** [August 18, 2015, 5:21pm UTC](https://meta.discourse.org/t/getting-user-profile-custom-field-via-js/32257/3 "2015-08-18T17:21:38Z")

</div>

Thanks, how do I get to the attribute?  
console.log(result.current\_user.custom\_fields); yields an object,  
i also tried:  
result.current\_user.custom\_fields.my\_field\_name  
and  
result.current\_user.custom\_fields.user\_field\_4  
they all return “undefined”

---

_[View the full topic](https://meta.discourse.org/t/getting-user-profile-custom-field-via-js/32257)._
