# Get Data Object

**URL:** <https://community.dynatrace.com/t/get-data-object/22189>\
**Category:** Open Q&A\
**Tags:** request-attributes, java\
**Created:** [October 3, 2019, 8:27pm UTC](https://community.dynatrace.com/t/get-data-object/22189 "2019-10-03T20:27:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [October 4, 2019, 8:33am UTC](https://community.dynatrace.com/t/get-data-object/22189/2 "2019-10-04T08:33:46Z")

</div>

What method you are trying to extract? In general if you will try to read object, dynatrace will make by default toString casting. This means that you will see class name in general. If you want value you have to use Accessor that will extract data of single type (like string or integer) from object. So it can looks like this:

MyObject.getUser().getUserName()

Accessors can be chained so you can make such think which will fetch from one object, another one. From second object we can fetch String with User Name.

You can’t as well just instrument class that conains object you want to extract. You have to instrument method that passes this object as parameter or return value and than mark this param as Request Attribute. Than you have to use proper Accessors to extract simple type data 🙂

Sebastian

---

_[View the full topic](https://community.dynatrace.com/t/get-data-object/22189)._
