# Swapping values within a field

**URL:** https://discuss.elastic.co/t/swapping-values-within-a-field/263473
**Category:** Elasticsearch
**Tags:** ingest-pipeline
**Created:** [February 5, 2021, 10:46pm UTC](https://discuss.elastic.co/t/swapping-values-within-a-field/263473 "2021-02-05T22:46:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![CoffeeDog](https://avatars.discourse-cdn.com/v4/letter/c/ed8c4c/32.png) [@CoffeeDog](https://discuss.elastic.co/u/CoffeeDog)
#### Post date: [February 5, 2021, 10:46pm UTC](https://discuss.elastic.co/t/swapping-values-within-a-field/263473/1 "2021-02-05T22:46:24Z")

</div>

I already have some data that is the following format:

`example_field : test_1,test_2`

I'd like to flip it to say  
`example_field: test_2,test_1`

is painless the way to do this? Or should I leverage something else within an ingest pipeline?

---

<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: [March 5, 2021, 10:46pm UTC](https://discuss.elastic.co/t/swapping-values-within-a-field/263473/2 "2021-03-05T22:46:48Z")

</div>

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