1.如何查看数据

查看数据使用调试代码段

2.如何变换数据    点击查看实例

在代码段管理中,添加自定义代码段,可以使用 Ctrl+Shift+空格的形式,变换数据格式,如果自己不会变换,可以向技术经理寻求帮助。

3.变换示例

原始数据目标格式描述方法
["/img/t.png","/img/t1.png","/img/t2.png"][{"lujing":"/img/t.png"},{"lujing":"/img/t1.png"},{"lujing":"/img/t2.png"}]将原始的简单的数组的每一项添加一个key,转化成JSON对象格式的数组数组添加key
[{"shenfenming": "H北京市","shenfenbianhao": "1"}, {"shenfenming": "H安徽省","shenfenbianhao": "2"}, {"shenfenming": "H广东省","shenfenbianhao": "3"}] 和 [{"shiquming": "H海淀区","shiqubianhao": "a1","shenfenid": "1"}, {"shiquming": "H朝阳区","shiqubianhao": "b1","shenfenid": "1"}, {"shiquming": "H密云区","shiqubianhao": "c1","shenfenid": "1"}, {"shiquming": "H合肥市","shiqubianhao": "a2","shenfenid": "2"}, {"shiquming": "H六安市","shiqubianhao": "b2","shenfenid": "2"}, {"shiquming": "H马鞍山市","shiqubianhao": "c2","shenfenid": "2"}, {"shiquming": "H广州市","shiqubianhao": "a3","shenfenid": "3"}, {"shiquming": "H朝阳市","shiqubianhao": "b3","shenfenid": "3"}, {"shiquming": "H汕头市","shiqubianhao": "c3","shenfenid": "3"}]{"shenfenbiao":[{"shenfenming":"H北京市","shenfenbianhao":"1"},{"shenfenming":"H安徽省","shenfenbianhao":"2"},{"shenfenming":"H广东省","shenfenbianhao":"3"}],"shiqubiao":{"1":[{"shiquming":"H海淀区","shiqubianhao":"a1","shenfenid":"1"},{"shiquming":"H朝阳区","shiqubianhao":"b1","shenfenid":"1"},{"shiquming":"H密云区","shiqubianhao":"c1","shenfenid":"1"}],"2":[{"shiquming":"H合肥市","shiqubianhao":"a2","shenfenid":"2"},{"shiquming":"H六安市","shiqubianhao":"b2","shenfenid":"2"},{"shiquming":"H马鞍山市","shiqubianhao":"c2","shenfenid":"2"}],"3":[{"shiquming":"H广州市","shiqubianhao":"a3","shenfenid":"3"},{"shiquming":"H朝阳市","shiqubianhao":"b3","shenfenid":"3"},{"shiquming":"H汕头市","shiqubianhao":"c3","shenfenid":"3"}]}}将两个表的查询数据整合成二级联动数据(多级联动同理)二级联动处理方法

4.注意事项

(1) 自定义代码段只用来做数据的格式变换,不用来进行循环的处理,如果数据转换也不能解决问题,可能是数据绑定的格式有问题,请询问技术经理解决。