# Feature Request: Add .toArray of class JointPositions

**URL:** <https://forum.universal-robots.com/t/feature-request-add-toarray-of-class-jointpositions/4491>\
**Category:** Product Wishlist\
**Created:** [June 11, 2019, 7:51am UTC](https://forum.universal-robots.com/t/feature-request-add-toarray-of-class-jointpositions/4491 "2019-06-11T07:51:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon65613222](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@anon65613222](https://forum.universal-robots.com/u/anon65613222)\
**Post date:** [June 11, 2019, 7:51am UTC](https://forum.universal-robots.com/t/feature-request-add-toarray-of-class-jointpositions/4491/1 "2019-06-11T07:51:50Z")

</div>

Description of feature:  
As a UR+ Developer I would like UR to add the .toArray method to the class JointPositions, so it can straight give the array, as it is possible for the class Pose.

Right now I need to do it like this:  
For Poses:

```
double[] tcp = currentPose.toArray(Length.Unit.M, Angle.Unit.RAD);

```

For JointPositions:

```
JointPosition[] temp = currentJointPositions.getAllJointPositions() ; //(Length.Unit.M, Angle.Unit.RAD);
double[] joints = {0,0,0,0,0,0};
joints[0]= temp[0].getAngle(Angle.Unit.RAD);
joints[1]= temp[1].getAngle(Angle.Unit.RAD);
joints[2]= temp[2].getAngle(Angle.Unit.RAD);
joints[3]= temp[3].getAngle(Angle.Unit.RAD);
joints[4]= temp[4].getAngle(Angle.Unit.RAD);
joints[5]= temp[5].getAngle(Angle.Unit.RAD);

```

I guess I could also use toString and parse that string to an Array of doubles, but I think it would make it a lot easier with a .toArray method.
