# JSON Schema confirmation

**URL:** <https://discuss.elastic.co/t/json-schema-confirmation/33314>\
**Category:** Elasticsearch\
**Created:** [October 29, 2015, 10:05pm UTC](https://discuss.elastic.co/t/json-schema-confirmation/33314 "2015-10-29T22:05:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Omkar\_Poudel](https://avatars.discourse-cdn.com/v4/letter/o/57b2e6/32.png) [@Omkar\_Poudel](https://discuss.elastic.co/u/Omkar_Poudel)\
**Post date:** [October 29, 2015, 10:05pm UTC](https://discuss.elastic.co/t/json-schema-confirmation/33314/1 "2015-10-29T22:05:31Z")

</div>

How do I create response like following from elasticsearch-rails. I am getting response that starts with "[".

{  
"data": [  
{  
"id": "1",  
"type": "xxx",  
"attributes": {  
"name": "a1"  
}  
},  
{  
"id": "2",  
"type": "yyy",  
"attributes": {  
"name": "a2"  
}  
},  
{  
"id": "3",  
"type": "zzz",  
"attributes": {  
"name": "a3"  
}  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![karmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karmi/32/44951_2.png) [@karmi](https://discuss.elastic.co/u/karmi)\
**Post date:** [October 30, 2015, 12:00pm UTC](https://discuss.elastic.co/t/json-schema-confirmation/33314/2 "2015-10-30T12:00:07Z")

</div>

Hi, can you be more specific? What are you trying to do, which API you want to use?

---

<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 5, 2017, 11:41pm UTC](https://discuss.elastic.co/t/json-schema-confirmation/33314/3 "2017-07-05T23:41:42Z")

</div>

Closed on July 5, 2017, 11:41pm UTC


