# /username.json error for a specific user on a topic

**URL:** <https://meta.discourse.org/t/username-json-error-for-a-specific-user-on-a-topic/46586>\
**Category:** Support\
**Created:** [June 28, 2016, 9:39pm UTC](https://meta.discourse.org/t/username-json-error-for-a-specific-user-on-a-topic/46586 "2016-06-28T21:39:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanrlio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivanrlio/32/48497_2.png) [@ivanrlio](https://meta.discourse.org/u/ivanrlio)\
**Post date:** [June 28, 2016, 9:39pm UTC](https://meta.discourse.org/t/username-json-error-for-a-specific-user-on-a-topic/46586/1 "2016-06-28T21:39:04Z")

</div>

We have developed a topic thread sidebar that displays topic contributors, suggested discussions etc. For one of our particular threads ([https://ask.twobyfore.com/t/craigslist-rental-scam/380](https://ask.twobyfore.com/t/craigslist-rental-scam/380)), a new user (darrell\_cray) doesn’t appear under ‘Question Contributors’.

Doing /topicid.json and then extracting all usernames:  
 ![](https://global.discourse-cdn.com/meta/original/3X/3/c/3ca28de1a3c5f99b419d45084e822e716264203a.png)

Doing the AJAX in console for this particular user:

 ![](https://global.discourse-cdn.com/meta/original/3X/8/0/80f878352bccc0de9a4e8c09c8e91a5c3fda4f59.png)

So for some reason, it’s working for both myself and Margaret, but not Darrell, as seen by the error message. I’ve checked the Rails console and he is in the database. Would anyone know why this could be?

---

<div class="post-metadata">

**Author:** ![ivanrlio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivanrlio/32/48497_2.png) [@ivanrlio](https://meta.discourse.org/u/ivanrlio)\
**Post date:** [June 28, 2016, 9:48pm UTC](https://meta.discourse.org/t/username-json-error-for-a-specific-user-on-a-topic/46586/2 "2016-06-28T21:48:38Z")

</div>

I think I figured it out… All more established users have an attribute called `array`, which I was traversing initially. So I should just do `data.user.name` and NOT `data.users[0]...`.

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [June 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/username-json-error-for-a-specific-user-on-a-topic/46586/3 "2024-06-08T12:45:30Z")

</div>

This topic was automatically closed after 2901 days. New replies are no longer allowed.
