Hi there,
i have a use case and i want to try it using painless. so the use case is there is a field containing a valid json and i want to extract just one field from it. basically it's a bit like using grok. the field name is requestPayload
and here is the value:
{"transaction_id":"xxxxx","channel":"f0","language":"id","version":"v2","service_id_a":"xxxxx","service_id_b":"xxxxx","offer_id":"113908","adn":"133","order_type":"ACT","purchase_mode":"REDEEM","payment_method":"PHYSICALVOUCHER","payment_name":"PHYSICALVOUCHER","kabupaten":"xxxxx","service_region":"1","subscription_flag":0,"reservation_flag":0,"property_list":{"property":null,"name":null},"dyn_properties":{"dyn_property":null,"name":null},"customer_info":{"customer_name":null,"customer_email":null},"expiry":{"duration":null,"uom":null},"merchant_profile":{"merchant_signature":null,"cai":null,"cati":null,"can":null,"fund_source":null,"address":null,"post_code":null,"district":null,"store_id":null,"city":null,"coordinate":null,"delivery_channel":null,"transmission_date":null,"field1":null,"field2":null,"field3":null,"field4":null,"field5":null,"fund_type":null,"business_model":null},"admin_fee":0,"hrn":"e42612e71ca54e4394e2b2496d44ac24b03f8ae144e47b7c276b6836ae8e2907"}
the one field that i want to extract from that value is offer_id
.
is it possible if i'm using painless in scripted field to achieve that?
i know i can achieve that by using logstash but there are so many logstash nodes in my cluster. it feels too troublesome. please let me know if you have any idea
Thanks