Write a function to transform a nested JSON object into a flat relational structure for Synchrony Financial data pipelines.