I am reading some values generated by different beacons, let's say beacon 1& beacon 2. I want to collect values of each beacon separately.
I think if there is a way to use a where statement would be easier like get values where beacon = 1 and then where beacon = 2
As far as I'm understanding: First, I created the multidirectional array:
var values = [[Int]]()
var tempBeacon = [Int]
Then, a for loop to collect some values for i beacons:
for i in 0...beaconCount-1 {
let beacon = beacons[i]
values[i] = tempBeacon.append(beacons[i].value)
}
Thank you guys, and excuse my programming skills as I'm a beginner.