kangarooDataCenterV3/jolt-demo/shift/spec3.json

20 lines
883 B
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[
{
"operation": "shift",
"spec": {
"rating": {
"primary": {
"value": "Rating",//输出Rating3
"max": "RatingRange"//输出RatingRange5
},
"*": {//匹配rating层级的quality、sharpness除了primary
"value": "SecondaryRatings.&1.Value",//左边rating.*.value :右边: SecondaryRatings.*.Value
"max": "SecondaryRatings.&1.Range",//左边rating.*.max :右边: SecondaryRatings.*.Range
"$": "SecondaryRatings.&1.Id" //表示使用输入键本身的值作为数据、左边 rating.*.quality or sharpness :右边: SecondaryRatings.*.Id
}
}
}
}
]
// * 通配符只能在LHS使用、* 代表匹配整个key字符串user-* 代表匹配以user开头的key字符串
// &1 * "quality"