title: Converting Array of Objects into Object of arrays
body: <p>I have a class with some arrays of different types and let's say they're all filled with the same amount.</p>
  
  <pre><code>public class CoreLocationMap {
  
  var type: [String] = []
  var location: [Int] = []
  var groupName: [NSString] = []
  var x: [Float] = []
  
  init() {}
  
  }
  </code></pre>
  
  <p>I want something like a JSON Object:</p>
  
  <pre><code>var jsonObject = ({type = myString; location = 123; groupName = anotherString; x = 0.123}, {type = myString; location = 123; groupName = anotherString; x = 0.123}, ...)
  </code></pre>
  
  <p>It's not necessarily to have a jsonObject, but i want to capsule my variables in logical groups, so</p>
  
  <pre><code>type
  location
  groupName
  x
  </code></pre>
  
  <p>should make a struct/object/whateever^^.
  If I use later for example a certain location i want to reference to the other variables in this group.
  I'm also pleased about other solutions. If you need more details please tell me.</p>
  
  <p>Thanks!</p>