# Narrowing a wide JSON parameter array via script transform

**URL:** <https://forum.inductiveautomation.com/t/narrowing-a-wide-json-parameter-array-via-script-transform/86298>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [February 23, 2024, 10:33pm UTC](https://forum.inductiveautomation.com/t/narrowing-a-wide-json-parameter-array-via-script-transform/86298 "2024-02-23T22:33:10Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![David\_Nicks](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@David\_Nicks](https://forum.inductiveautomation.com/u/David_Nicks)\
**Post date:** [February 24, 2024, 3:01pm UTC](https://forum.inductiveautomation.com/t/narrowing-a-wide-json-parameter-array-via-script-transform/86298/7 "2024-02-24T15:01:26Z")

</div>

> [@cmallonee](#):
>
> What's the exception/error?

DotReferenceJythonMap object doesn't support item deletion.

Tried your sample script and I'm getting a "Parse Error in script transform" on row\_dict = {}.

(by the way, how do you copy/paste an error message when it's only visible in the tooltip when you hover over the Error\_Configuration script result in the binding dialog?)

[This post](https://forum.inductiveautomation.com/t/dotreferencejythonmap-is-missing-pop-method/82178) talks about having to re-map a JythonMap into an array of dictionaries due to chained transforms. I only have one single transform here, but I tried re-mapping the JythonMap object and that seems to work:

```auto
	value = [dict(x) for x in value[:]]
	cols = ["id","loc"]
	result=[]
	for row in value:
		for key in row.keys():
			if key not in cols:
				del row[key]
		result.append(row)
	return value

```

So before I move on, I'm curious if this is the best solution or if there's something else I should be doing to avoid the need to remap (ok, use a dataset result from the query, yeah I know, but is that all?).

---

_[View the full topic](https://forum.inductiveautomation.com/t/narrowing-a-wide-json-parameter-array-via-script-transform/86298)._
