# DotReferenceJythonMap is missing pop() method

**URL:** <https://forum.inductiveautomation.com/t/dotreferencejythonmap-is-missing-pop-method/82178>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 21, 2023, 9:30am UTC](https://forum.inductiveautomation.com/t/dotreferencejythonmap-is-missing-pop-method/82178 "2023-11-21T09:30:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frosty](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@Frosty](https://forum.inductiveautomation.com/u/Frosty)\
**Post date:** [November 21, 2023, 9:30am UTC](https://forum.inductiveautomation.com/t/dotreferencejythonmap-is-missing-pop-method/82178/1 "2023-11-21T09:30:30Z")

</div>

When creating a chain of script transforms in a perspective binding, working with an array of dictionaries/documents is very troublesome, because Ignition converts the Python dictionaries into [DotReferenceJythonMap](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.0/com/inductiveautomation/perspective/gateway/script/DotReferenceJythonMap.html) objects after each transform step.

So let's say I have two transform scripts:

- One for performing a calculation on the values
- One for filtering the values

I have to start the second transform script with  
`value = [dict(x) for x in value[:]]`  
to convert the value back from an array of DotReferenceJythonMap objects to an array of python dictionaries, because their API is not equal. For example, the DotReferenceJythonMap does not have a `pop()` method.

So while there is a workaround, it increases the time complexity by _N_ because I have to introduce another loop over the data which should not be needed otherwise.

Is there a better way to deal with this? Or is there a way to stop this conversion from happening?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 21, 2023, 12:55pm UTC](https://forum.inductiveautomation.com/t/dotreferencejythonmap-is-missing-pop-method/82178/2 "2023-11-21T12:55:57Z")

</div>

> [@Frosty](#):
>
> better way

Yes. Don't chain transforms. A script transform has substantial overhead, so only **one** should ever be attached to a binding. Instead, delegate to one or more project library scripts. (Nest the calls, so result from one is the `value` arg to the next. Do **not** use `def` or `import` inside a transform.)

> [@Frosty](#):
>
> stop this conversion

Nope.

This is all discussed in some detail, with non-scripting alternatives, in my Integration Toolkit module topic (and its docs):

> [@Automation Professionals' Integration Toolkit Module](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934):
>
> Automation Professionals is pleased to announce the immediately availability of a major upgrade to its free Simulation Aids Integration Toolkit module. The new feature justifying the "major upgrade" language is the implementation of eleven new expression functions which use iteration to accomplish complex transforms of datasets and lists, to or from other datasets and lists, applying filtering, ordering, and computed new columns along the way. While there are certain operations that are still …
