# Access nested array objects in script query

**URL:** <https://discuss.elastic.co/t/access-nested-array-objects-in-script-query/168461>\
**Category:** Elasticsearch\
**Created:** [February 14, 2019, 5:23pm UTC](https://discuss.elastic.co/t/access-nested-array-objects-in-script-query/168461 "2019-02-14T17:23:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 15, 2019, 8:57am UTC](https://discuss.elastic.co/t/access-nested-array-objects-in-script-query/168461/2 "2019-02-15T08:57:47Z")

</div>

Have you thought of using an ingest processor that checks the value height and width at index time and stores the result in another field? Then you would have fast queries as you do not need to run an expensive script query at all.

Of course this only makes sense if you have a limited number of such checks.

--Alex

---

_[View the full topic](https://discuss.elastic.co/t/access-nested-array-objects-in-script-query/168461)._
