문제

I am given the following JSON structure:

{
    "document": {
        "sections": {
            "x": {
                "title": "foo"
            },
            "y": {
                "title": "bar"
            }
        }
    }
}

How do I update value of the title property for a given section using the HTTP API?

I would like to provide a path (string) to get to the property.

도움이 되었습니까?

해결책

This was fixed in build 2254. You should now be able to issue a single scripted patch like this:

EVAL http://localhost:8080/docs/foos/1

{Script:"this.document.sections.x.title = newTitle;",Values:{"newTitle":"Whatever"}}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top