                 
                 
                 
-//                                print(self.chatMessages)
-                //                print(self.chatMessageData!)
-                
-                
+                //Storing the result from oldest to newest message
                 var i = self.chatMessages.count
                 
                 for (_,subJson) in self.chatMessages {

        //Create double tap gesture
        let doubleTapGesture = UITapGestureRecognizer(target: self, action: Selector("showHiddenTimestamp:"))
        doubleTapGesture.numberOfTapsRequired = 2
//
        //Add gestures on tableview
        mainTableview.addGestureRecognizer(tapGesture)
        mainTableview.addGestureRecognizer(doubleTapGesture)

    //JSON to keep the response
    var chatMessages:JSON = []
    
    //Dictionary to keep each chatMessage
    var chatMessageData = [Int():ChatMessage()]
    
    
    override func viewWillAppear(animated: Bool) {
        
