Create a POST body for a search

I would like some help on a query that I am trying. I have three fields in my JSON. The field1.key, field2.key and field3 which has a nest of data1,data2,data3. What I am trying to do is. Get per unique combination of the field1.key and field2.key the full nest of field3. I just want the latest result, not everything. I know that the first path is being done using aggs, however, I don’t know how to fetch only the latest nest of data. Can someone create a body for me?