首页 > 解决方案 > Jolt:合并属性

问题描述

我正在尝试将顶层具有相同名称的属性与Jolt合并。属性可以重复3次以上,所以我不得不概括一下。

我已经尝试了几件事,但我发现很难掌握整个 Jolt 的想法。

我真的很感激一些帮助!

输入:

{
    "document": [
        [0, 171, "Creativity is to turn your gifts into a perfect cocktail through which you will You will You will You will be emphatically express your personal understanding of the world.", []]
    ],
    "sentence_embeddings": [
        [0, 171, "Creativity is to turn your gifts into a perfect cocktail through which you will You will You will You will be emphatically express your personal understanding of the world.", ["0", "Creativity is to turn your gifts into a perfect cocktail through which you will You will You will You will be emphatically express your personal understanding of the world.", "-1", "true"]]
    ],
    "sentiment": [
        [0, 171, "+1", ["0", "1.0", "3.1850244E-20"]]
    ],
    "document": [
        [0, 101, "Creativity in this time is not a cliché, it's a universe, a movement that has now lifted up the cubit.", []]
    ],
    "sentence_embeddings": [
        [0, 101, "Creativity in this time is not a cliché, it's a universe, a movement that has now lifted up the cubit.", ["0", "Creativity in this time is not a cliché, it's a universe, a movement that has now lifted up the cubit.", "-1", "true"]]
    ],
    "sentiment": [
        [0, 101, "-1", ["0", "0.16451636", "0.8354836"]]
    ],
    "document": [
        [0, 149, "There is a platform that constantly inspires every creative community in the world and it belongs to an unspirited in every respect, the Bombay Sapphi", []]
    ],
    "sentence_embeddings": [
        [0, 149, "There is a platform that constantly inspires every creative community in the world and it belongs to an unspirited in every respect, the Bombay Sapphi", ["0", "There is a platform that constantly inspires every creative community in the world and it belongs to an unspirited in every respect, the Bombay Sapphi", "-1", "true"]]
    ],
    "sentiment": [
        [0, 149, "+1", ["0", "1.0", "3.8180545E-22"]]
    ]
}

期望的输出:

{
    "document": [
        [0, 171, "Creativity is to turn your gifts into a perfect cocktail through which you will You will You will You will be emphatically express your personal understanding of the world.", []],
[0, 101, "Creativity in this time is not a cliché, it's a universe, a movement that has now lifted up the cubit.", []],
[0, 149, "There is a platform that constantly inspires every creative community in the world and it belongs to an unspirited in every respect, the Bombay Sapphi", []]
    ],
    "sentence_embeddings": [
        [0, 171, "Creativity is to turn your gifts into a perfect cocktail through which you will You will You will You will be emphatically express your personal understanding of the world.", ["0", "Creativity is to turn your gifts into a perfect cocktail through which you will You will You will You will be emphatically express your personal understanding of the world.", "-1", "true"]],
[0, 101, "Creativity in this time is not a cliché, it's a universe, a movement that has now lifted up the cubit.", ["0", "Creativity in this time is not a cliché, it's a universe, a movement that has now lifted up the cubit.", "-1", "true"]],
[0, 149, "There is a platform that constantly inspires every creative community in the world and it belongs to an unspirited in every respect, the Bombay Sapphi", ["0", "There is a platform that constantly inspires every creative community in the world and it belongs to an unspirited in every respect, the Bombay Sapphi", "-1", "true"]]
    ],
    "sentiment": [
        [0, 171, "+1", ["0", "1.0", "3.1850244E-20"]],
        [0, 101, "-1", ["0", "0.16451636", "0.8354836"]],
        [0, 149, "+1", ["0", "1.0", "3.8180545E-22"]]
    ]
}

标签: jsontransformjolt

解决方案


推荐阅读