I have a class with some arrays of different types and let's say they're all filled with the same amount.
public class CoreLocationMap {
var type: [String] = []
var location: [Int] = []
var groupName: [NSString] = []
var x: [Float] = []
init() {}
}
I want something like a JSON Object:
var jsonObject = ({type = myString; location = 123; groupName = anotherString; x = 0.123}, {type = myString; location = 123; groupName = anotherString; x = 0.123}, ...)
It's not necessarily to have a jsonObject, but i want to capsule my variables in logical groups, so
type
location
groupName
x
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.
Thanks!