# Trouble Converting JS Object

**URL:** <https://discourse.nodered.org/t/trouble-converting-js-object/16699>\
**Category:** General\
**Created:** [14 October 2019 15:20 UTC](https://discourse.nodered.org/t/trouble-converting-js-object/16699 "2019-10-14T15:20:36Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [15 October 2019 12:11 UTC](https://discourse.nodered.org/t/trouble-converting-js-object/16699/11 "2019-10-15T12:11:24Z")

</div>

There is a discussion of a (somehow) similar [use case in this topic](https://discourse.nodered.org/t/read-data-from-json-array/1938/40). The final solution for that case was like Nick suggested you now: generate an array from the object, sort the array by timestamp and finally take the last element of the array.

---

_[View the full topic](https://discourse.nodered.org/t/trouble-converting-js-object/16699)._
