             if let description = command.commandDescription {
                 descriptionSection.items.append(description)
             }
+            if let metadata = command.metadata {
+                if let data = try? NSJSONSerialization.dataWithJSONObject(
+                     metadata, options: .PrettyPrinted) {
+                    metadataSection.items.append(
+                      NSString(data:data,
+                               encoding:NSUTF8StringEncoding)! as String)
+                }
+            }
         }
 
-        sections += [targetIdSection, titleSection, descriptionSection]
+        sections += [targetIdSection, titleSection, descriptionSection,
+                     metadataSection]
     }
 
     override func tableView(

            }
        }
        // the defaultd schema and schemaVersion from predefined schem dict
        var schema: String? = (self.view.viewWithTag(200) as? UITextField)?.text
        var schemaVersion: Int?
        if let schemaVersionTextFiled = self.view.viewWithTag(201) as? UITextField {
            schemaVersion = Int(schemaVersionTextFiled.text!)!
        }
        var targetID: String? =
          (self.view.viewWithTag(202) as? UITextField)?.text
        var title: String? = (self.view.viewWithTag(203) as? UITextField)?.text
        var description: String? =
          (self.view.viewWithTag(204) as? UITextView)?.text
        var metadata: Dictionary<String, AnyObject>?

        if self.delegate != nil {
            delegate?.saveCommands(schema!,

        var titleSection = SectionStruct(headerTitle: "Title", items: [])
        var descriptionSection = SectionStruct(headerTitle: "Description",
                                               items: [])
        var metadataSection = SectionStruct(headerTitle: "Meta data",
                                            items: [])

        if let command = self.commandStruct {
            if let targetID = command.targetID {
                targetIdSection.items.append(targetID)
