# How to remove specific element from array

**URL:** https://discuss.elastic.co/t/how-to-remove-specific-element-from-array/104057
**Category:** Elasticsearch
**Created:** [October 16, 2017, 7:47am UTC](https://discuss.elastic.co/t/how-to-remove-specific-element-from-array/104057 "2017-10-16T07:47:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dbrezoev](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@dbrezoev](https://discuss.elastic.co/u/dbrezoev)
#### Post date: [October 16, 2017, 7:47am UTC](https://discuss.elastic.co/t/how-to-remove-specific-element-from-array/104057/1 "2017-10-16T07:47:41Z")

</div>

I have a document with field, which is array of many objects (id and name). How can I delete one of these objects? I am using javascript api and ES 5.5. I know I can just update the whole document, but the array is really big, is there any more optimal way?

Thank you

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 13, 2017, 7:47am UTC](https://discuss.elastic.co/t/how-to-remove-specific-element-from-array/104057/2 "2017-11-13T07:47:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
