title: How to separate tuples, dictionaries and lists
body: <p>I have an rdd that's been formed by joining other rdds. It's in a messy way due to the way I have added it. It has the following form:</p>
  
  <pre><code>('string',
  ([array],
  {'string',
  'string'}))
  </code></pre>
  
  <p>So it looks like this when I do bc.first()</p>
  
  <pre><code>('o9eMRCWt5PkpLDE0gOPtcQ',
   (['Italian', 'Restaurants'],
    {'Traumhaft. \nGemütlich und absolutes Spitzenniveau. \nMan kommt einfach an.\n\nDas Konzept ist wenig Produkte, dafür alles frisch und in Topqualität. \n\nDer Gruß aus der Küche war schon genial, das Foccacia und die Creme spitze. \n\nVorspeise und Hauptgerichte ein Traum.',
     'yJqCuWgVBBtFP6nGp6T1jw'}))
  </code></pre>
  
  <p>Essentially what I'm looking for is </p>
  
  <pre><code>('string',
  array,
  'string',
  'string')
  </code></pre>
  
  <p>Sorry if this is ambiguous, I can clarify if required. I am new to this kind of stuff. </p>
  
  <p>I've looked into using flat maps but that's not worked for me.</p>