Create several es type from one json input

I have a json input :

[
{
"fields": {
"last_reported": 1519897717,
"is_returning": 1,
"numbikesavailable": 4,
"numdocksavailable": 25,
"lon": 2.275342586850291,
"lat": 48.8296843300915,
"is_installed": 1,
"is_renting": 1,
"station_id": 7234,
"name": "Colonel Pierre Avia",
"capacity": 31,
"xy": [
48.8296843301,
2.27534258685
]
},
"geometry": {
"type": "Point",
"coordinates": [
2.27534258685,
48.8296843301
]
},
"record_timestamp": "2018-03-19T00:16:33+00:00",
"recordid": "e9a4f7a8874ba8dd9b3d004640d99759b3683005"
},
{
"fields": {
"last_reported": 1519897923,
"is_renting": 0,
"is_returning": 0,
"numbikesavailable": 26,
"station_id": 54000632,
"numdocksavailable": 10,
"is_installed": 0
},
"record_timestamp": "2018-03-19T00:16:33+00:00",
"recordid": "2488a7afe3c524c4901f698559aff4c275788473"
},
{
"fields": {
"last_reported": 1519897673,
"is_renting": 1,
"is_returning": 1,
"numbikesavailable": 12,
"station_id": 43195240,
"numdocksavailable": 14,
"is_installed": 1
},
"record_timestamp": "2018-03-19T00:16:33+00:00",
"recordid": "c7612546f11a48e5b2e3350a2497b63f55a0903d"
},
{
"fields": {
"last_reported": 1519748094,
"is_renting": 1,
"is_returning": 1,
"numbikesavailable": 18,
"station_id": 35101194,
"numdocksavailable": 12,
"is_installed": 1
},
"record_timestamp": "2018-03-19T00:16:33+00:00",
"recordid": "b6f9a4018750a289155f4b4a3e3385e094abf0e7"
}
]

I want to split this input and create one type wihch would have the name of a field for each item of source array .

It would be easier to understand if you gave an example.

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