var chatMessages = [[String: ChatMessage]]()
Firebase Chat Messages structure is like this.
-Kjws99ol6qjFt7ET9C
content: "Hehd"
displayName: "John Doe"
fileLength: 0
fileUrl: ""
fromID: "5904ee8cfa"
isRead: false
messageStatus: 2
messageType: "normal"
timestamp: 1494596232
Now on childAdded I'm appending the new message like this
weakSelf.chatMessages.append(newMessage)
//Kjws99ol6qjFt7ET9C - This is the threadID which is stored in String and below value is stored in ChatMessage
But after message isRead by user it value changes and that is identified by childChanged so in childChanged change how to update my Array correctly?