json - 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"]]
]
}
解决方案
推荐阅读
- javascript - 如何在cookie数组中添加数据而不推入数组jquery
- excel - 如何在另一个不活动的工作簿中添加工作表
- java - 当我创建一个新项目时,总是会发生这种情况
- c++ - C++:将派生类的实例指针存储在容器的 STL 容器中
- select - tidyverse 错误中的 select() 和 group_by()
- python - 随机数据的“有偏差”SVM 分类结果?
- python - 读取 .zip URL 中的两个文件:删除 PDF,保留 CSV
- r - R:从现有数据框创建新数据框以研究一个变量(列)的变化
- android - 尽管启用了 UserManager.DISALLOW_INSTALL_APPS,但仍安装特定的应用程序
- c - SCHED_RR 未将时间片返回到正确的线程