wanted to transfer only selected filed from a json file. and one field has array of objects and from that wanted to take only one object
hotel.json
count:25000
results:
hotelcode:h001
hotelname: Pearl City Hotel
city: CMB
image: [{cat:1,original:hoo1_1.jpg},
{cat:1,original:hoo1_2.jpg},
{cat:2,original:hoo1_3.jpg},
{cat:3,original:hoo1_4.jpg}]
year_build:null
description:null
want to take only one original from multiple original object
mutate {
add_field => {
hotelcode => "%{[results][hotelcode]}"
hotelname => "%{[results][hotelname]}"
city => "%{[results][city]}"
image => .....
}
}