# Dynamic Objectpath for extracting an element

**URL:** https://discourse.nodered.org/t/dynamic-objectpath-for-extracting-an-element/50951
**Category:** General
**Created:** [13 September 2021 09:14 UTC](https://discourse.nodered.org/t/dynamic-objectpath-for-extracting-an-element/50951 "2021-09-13T09:14:39Z")
**Posts on this page:** 1
**Showing post:** 15

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [13 September 2021 11:21 UTC](https://discourse.nodered.org/t/dynamic-objectpath-for-extracting-an-element/50951/15 "2021-09-13T11:21:59Z")

</div>

No. Don't use eval. It is fraught with danger.

Use `RED.util.getObjectProperty`

See similar thread here : [Alternatives to eval() - #2 by Steve-Mcl](https://discourse.nodered.org/t/alternatives-to-eval/50550/2)

---

_[View the full topic](https://discourse.nodered.org/t/dynamic-objectpath-for-extracting-an-element/50951)._
