Hi Konstatine,
Can you create the JSON structure with a microflow? This will allow you use export mappings.
If you want to fetch thing over association you do a get with the associated guid, with action or get
https://apidocs.rnd.mendix.com/8/client/mx.data.html
Or retrieve it directly
https://apidocs.rnd.mendix.com/8/client/mendix_lib_MxObject.html#fetch
Cheers,
Andries