 
 }
 
+public func ==(lhs : JSONPath,rhs : JSONPath) -> Bool {
+    return lhs.content == rhs.content
+}
+public func ==(lhs : JSONPathComponent,rhs : JSONPathComponent) -> Bool {
+    switch (lhs,rhs) {
+    case (.Key(let v1),.Key(let v2)) where v1 == v2:
+        return true
+    case (.Index(let v1),.Index(let v2)) where v1 == v2:
+        return true
+    default :
+        return false
+    }
+}
+
 public func +(var lhs: JSONPath, rhs: JSONPath) -> JSONPath {
     lhs.append(rhs)
     return lhs
 }
 public func +(var lhs: JSONPath, rhs: JSONPathComponent) -> JSONPath {
     lhs.append(rhs)
+    return lhs
+}
+public func +(var lhs: JSONPath, rhs: Int) -> JSONPath {
+    lhs.append(JSONPathComponent(rhs))
+    return lhs
+}
+public func +(var lhs: JSONPath, rhs: String) -> JSONPath {
+    lhs.append(JSONPathComponent(rhs))
     return lhs
 }
 

        self.content = []
    }
    public init(_ component: String) {
        self.content = [component]
    }
    public init(_ component: Int) {
        self.content = [component]
    }
    public init(_ path: JSONPath) {
        self.content = path.content

        guard currentValue.underlying != nil else {return JSONValue(underlying: nil,path : self.path + path)}
        for component in path.content {
            currentPath.append(component)
            switch (component, currentValue.underlying) {
            case (.Key(let key), let v as Dictionary<String,AnyObject>):
                if let newValue = v[key] {
                    currentValue = JSONValue(underlying: newValue,path : currentPath)
                } else {
                    return JSONValue(underlying: nil,path : currentPath)
                }
            case (.Index(let index), let v as Array<AnyObject>):
                if index < v.count {
                    currentValue = JSONValue(underlying: v[index],path : currentPath)
                } else {
                    return JSONValue(underlying: nil,path : self.path + path)
                }
            default:
                return JSONValue(underlying: nil,path : self.path + path)
            }
        }
