嵌套的JSON对象:JSON内部引用声明

时间:2018-03-01 08:16:16

标签: json

我想只更新每个json对象中的一个字段,例如:from" chartScrollbar 我只想更新backgroundAlpha而只更新tablecursor cursorAlpha 虽然在同一个json文件中使用第三个对象。我们可以在同一个json

中访问其他对象值
config: {
                "type": "serial",
                "theme": "light",
                "glueToTheEnd": true,
                "marginRight": 40,
                "marginLeft": 40,
                "autoMarginOffset": 20,
                "mouseWheelZoomEnabled": true,

                "chartScrollbar": {
                    "graph": "g1",
                    "oppositeAxis": false,
                    "offset": 30,
                    "scrollbarHeight": 80,
                    "backgroundAlpha": 0,
                    "selectedBackgroundAlpha": 0.1,
                    "selectedBackgroundColor": "#888888",
                    "graphFillAlpha": 0,
                    "graphLineAlpha": 0.5,
                    "selectedGraphFillAlpha": 0,
                    "selectedGraphLineAlpha": 1,
                    "autoGridCount": true,
                    "color": "#AAAAAA"
                },
                "chartCursor": {
                    "pan": true,
                    "valueLineEnabled": true,
                    "valueLineBalloonEnabled": true,
                    "cursorAlpha": 1,
                    "cursorColor": "#258cbb",
                    "limitToGraph": "g1",
                    "valueLineAlpha": 0.2,
                    "valueZoomable": true
                },

            }

1 个答案:

答案 0 :(得分:0)

You can try in this way :
"arrows": [{
                    "alpha": 1,
                    "innerRadius": "35%",
                    "nailRadius": 0,
                    "radius": "170%"
                }],
                "data": []
            },
            Config:{
                        "axes" : "config.axes.endValue"
            }