# Defining the Order of Fields Returned in REST API JSON

**URL:** https://discuss.elastic.co/t/defining-the-order-of-fields-returned-in-rest-api-json/186967
**Category:** Elasticsearch
**Created:** [June 22, 2019, 6:46pm UTC](https://discuss.elastic.co/t/defining-the-order-of-fields-returned-in-rest-api-json/186967 "2019-06-22T18:46:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![thegrif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thegrif/32/85515_2.png) [@thegrif](https://discuss.elastic.co/u/thegrif)
#### Post date: [June 22, 2019, 6:46pm UTC](https://discuss.elastic.co/t/defining-the-order-of-fields-returned-in-rest-api-json/186967/1 "2019-06-22T18:46:55Z")

</div>

I'm working on a prototype of a search application and the guys reviewing it are getting a little bent out over the fields in the returned json. I've explained to them that the json spec specifically states there is no enforced/implied order...is there anyway I can influence what is output?

Is there any other alternative other than using the \_source field to display the oirginal json as it was passed during ingestion?

Thanks!

---

<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: [July 20, 2019, 6:55pm UTC](https://discuss.elastic.co/t/defining-the-order-of-fields-returned-in-rest-api-json/186967/2 "2019-07-20T18:55:39Z")

</div>

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