I have logs with below format:
Feb 18 23:25:49 ip-x-x-x-x customerService 2020-02-18T23:25:49.340Z level=INFO component=customerServiceresource message="Request {"customerDetails":{"customerName":"Jack","bank":"xxx","action":"decline"}}
Feb 18 23:25:49 ip-x-x-x-x customerService 2020-02-18T23:25:49.340Z level=INFO component=customerServiceresource message="Request {"customerDetails":{"customerName":"mike","bank":"xxx","action":"approve"}}
Feb 18 23:25:49 ip-x-x-x-x customerService 2020-02-18T23:25:49.340Z level=INFO component=customerServiceresource message="Request {"customerDetails":{"customerName":"holden","bank":"yyy","action":"approve"}}
Feb 18 23:25:49 ip-x-x-x-x customerService 2020-02-18T23:25:49.340Z level=INFO component=customerServiceresource message="Request {"customerDetails":{"customerName":"leslie","bank":"yyy","action":"decline"}}
1) Get the count records where bank is xxx and action is approve
2) Get the count records where bank is yyy and action is decline
3) display all records that are having bank yyy and action is decline (displaying point 2)
... View more