I have integrated Bluetooth Objective-C library and when it discovers devices, the device details are stored in the array of 'BGXDevice' - BGXArray (print from Xcode debugger below).
print(BGXArray)
[DEV-4F7D rssi=-85 id=673A4E30-01FA-7DB2-BBF3-F65916C8C05C DeviceState=Disconnected, DEV-4F7D rssi=-96 id=673A4E30-01FA-7DB2-BBF3-F65916C8C05C DeviceState=Disconnected]
How do I access the elements in this array e.g. id in Swift
print(BGXArray[0].id)
Gives in Xcode error value of type 'BGXDevice' has no member 'id'
I could do some string manipulation to find 'id' from the array element and then the value after '=' sign, but there must be a better way?