Given a list of nested dictionaries representing JSON data, write a recursive function to flatten the structure.