Pulled out app structure data into JSON file and looping function