JSON Schema confirmation


(Omkar Poudel) #1

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"
}
}
]
}


(Karel Minarik) #2

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


(system) #3