Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arrays 使用通配符的震动数组变换_Arrays_Json_Jolt - Fatal编程技术网

Arrays 使用通配符的震动数组变换

Arrays 使用通配符的震动数组变换,arrays,json,jolt,Arrays,Json,Jolt,我正在使用JOLT转换以下数据: [{"a" : "a", "b" : "b", "c" : "c", ...}, {"a" : "a", "b" : "b", "c" : "c", ...}] 致: 我正在尝试找出一个通配符,它可以映射我不需要更改的所有属性。比如: [{ "operation": "shift", "spec": { "*": { "a": "[&1].a1", "b": "[&1].b1",

我正在使用JOLT转换以下数据:

[{"a" : "a",
  "b" : "b",
  "c" : "c",
  ...},
 {"a" : "a",
  "b" : "b",
  "c" : "c",
  ...}]
致:

我正在尝试找出一个通配符,它可以映射我不需要更改的所有属性。比如:

[{
  "operation": "shift",
  "spec": {
    "*": {
      "a": "[&1].a1",
      "b": "[&1].b1",
      "c": "[&1].c1",
      "*": {
        "@": "&"
      }
    }
  }
}]
其中:

"*": {
        "@": "&"
      }
将用作所有不需要更新的字段的通配符。

Spec

[{
  "operation": "shift",
  "spec": {
    "*": {
      "a": "[&1].a1",
      "b": "[&1].b1",
      "c": "[&1].c1",
      "*": "[&1].&"
    }
  }
}]

非常感谢。我终于弄明白了。
[{
  "operation": "shift",
  "spec": {
    "*": {
      "a": "[&1].a1",
      "b": "[&1].b1",
      "c": "[&1].c1",
      "*": "[&1].&"
    }
  }
}]