$ root node operator represents the root node of the current JSON struct..<childName> dot operator or the ['<childName>'] bracket operator represents selecting the child member named childName of the current object... recursive operator represents obtaining all child members of the current object in a recursive manner.[<index>] subscript operator represents obtaining the index-th child member of the current iterable object.{"@timestamp": 1648803500.63659,"@filepath": "/var/log/tke-log-agent/test7/xxxxxxxx-adfe-4617-8cf3-9997aea90ded/c_tke-es-xxxxxxxx57-n29jr_default_nginx-xxxxxxxx49626ef42d5615a636aae74d6380996043cf6f6560d8131f21a4d8ba/jgw_INFO_2022-02-10_15_4.log","log": "15:00:00.000[4349811564226374227] [http-nio-8081-exec-64] INFO com.qcloud.jgw.gateway.server.topic.TopicService","kubernetes": {"pod_name": "tke-es-xxxxxxxxxx-n29jr","namespace_name": "default","pod_id": "xxxxxxxx-adfe-4617-8cf3-9997aea90ded","labels": {"k8s-app": "tke-es","pod-template-hash": "xxxx95d557","qcloud-app": "tke-es"},"annotations": {"qcloud-redeploy-timestamp": "1648016531476","tke.cloud.tencent.com/networks-status": "[{\\n \\"name\\": \\"tke-bridge\\",\\n \\"interface\\": \\"eth0\\",\\n \\"ips\\": [\\n \\"172.16.x.xx\\"\\n ],\\n \\"mac\\": \\"xx:xx:xx:4a:c2:ba\\",\\n \\"default\\": true,\\n \\"dns\\": {}\\n}]"},"host": "10.0.xx.xx","container_name": "nginx","docker_id": "xxxxxxxx49626ef42d5615a636aae74d6380996043cf6f6560d8131f21a4d8ba","container_hash": "nginx@sha256:xxxxxxxx7b29b585ed1aee166a17fad63d344bc973bc63849d74c6452d549b3e","container_image": "nginx"}}
qcloud-app member field, you can use the JSONPath syntax $.kubernetes.labels.qcloud-app or $.['kubernetes'].['labels'].['qcloud-app'] in data processing.
.), the bracket operator must be used to wrap the variable name.{"key1.key2":"value1"}, you need to use $.['key1.key2'].* wildcard operator represents obtaining all child members of the current object.*~ built-in function represents obtaining the names of all child objects of the current iterable object.min() built-in function represents obtaining the minimum value among the child objects of the current iterable object.max() built-in function represents obtaining the maximum value among the child objects of the current iterable object.sum() built-in function represents obtaining the sum of the child objects of the current iterable object.concat() built-in function represents concatenating multiple objects and generating a string.{"data": {"Response": {"Result": {"Routers": [{"AccessType": 0,"RouteId": 81111,"VpcId": "vpc-xxxxxxxx","VipType": 3,"VipList": [{"Vip": "10.0.0.189","Vport": "9xxx"}]},{"AccessType": 0,"RouteId": 81112,"VpcId": "vpc-r5sbavzp","VipType": 3,"VipList": [{"Vip": "10.0.0.248","Vport": "9xxx"}]},{"AccessType": 0,"RouteId": 81113,"VpcId": "vpc-xxxxxxxx","VipType": 3,"VipList": [{"Vip": "10.0.0.210","Vport": "9xxx"}]}]},"RequestId": "20e74750-ca40-403d-9ea9-d3f63b5415d2"}},"code": 0}
* syntax in JSONPath can be used to match all elements in the list.$.data.Response.Result.Routers[*].VipList[0].Vip.
{"data": {"Response": {"SubnetSet": [{"VpcId": "vpc-xxxxxxxx","SubnetId": "subnet-xxxxxxxx","SubnetName": "ckafka_cloud_subnet-1","CidrBlock": "10.0.0.0/19","Ipv6CidrBlock": "","IsDefault": false,"IsRemoteVpcSnat": false,"EnableBroadcast": false,"Zone": "ap-changsha-ec-1","RouteTableId": "rtb-xxxxxxxx","NetworkAclId": "","TotalIpAddressCount": 8189,"AvailableIpAddressCount": 8033,"CreatedTime": "2021-01-25 17:31:00","TagSet": [],"CdcId": "","IsCdcSubnet": 0,"LocalZone": false,"IsShare": false}],"TotalCount": 1,"RequestId": "705c4955-0cd9-48b2-9132-79eadae2e3e6"}},"code": 0}
concat() function in JSONPath to aggregate multiple fields, and further modify the strings on this basis.$.concat($.data.Response.SubnetSet[0].VpcId,"#",$.data.Response.SubnetSet[0].SubnetId,"#",$.data.Response.SubnetSet[0].CidrBlock)) syntax to concatenate the properties of VPC and subnets, and separate them with the # character.

Feedback