Nested fields ElasticSearch and Logstash

Hello, I am new in ES and logstash so I need some help

I need to perform an indexation of data from postgres in ES
My problem is that there are many relationships in the database, and I don't know how to perform many nested fields embedded inside already nested fields with logstash file so that I can have a structured documents in ES

Thanks in advance