{"action":"created","issue":{"url":"https://api.github.com/repos/vega/vega/issues/1371","repository_url":"https://api.github.com/repos/vega/vega","labels_url":"https://api.github.com/repos/vega/vega/issues/1371/labels{/name}","comments_url":"https://api.github.com/repos/vega/vega/issues/1371/comments","events_url":"https://api.github.com/repos/vega/vega/issues/1371/events","html_url":"https://github.com/vega/vega/issues/1371","id":342710493,"node_id":"MDU6SXNzdWUzNDI3MTA0OTM=","number":1371,"title":"How to access nested json in vega","user":{"login":"varmatangoit","id":40787508,"node_id":"MDQ6VXNlcjQwNzg3NTA4","avatar_url":"https://avatars1.githubusercontent.com/u/40787508?v=4","gravatar_id":"","url":"https://api.github.com/users/varmatangoit","html_url":"https://github.com/varmatangoit","followers_url":"https://api.github.com/users/varmatangoit/followers","following_url":"https://api.github.com/users/varmatangoit/following{/other_user}","gists_url":"https://api.github.com/users/varmatangoit/gists{/gist_id}","starred_url":"https://api.github.com/users/varmatangoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varmatangoit/subscriptions","organizations_url":"https://api.github.com/users/varmatangoit/orgs","repos_url":"https://api.github.com/users/varmatangoit/repos","events_url":"https://api.github.com/users/varmatangoit/events{/privacy}","received_events_url":"https://api.github.com/users/varmatangoit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-19T12:38:12Z","updated_at":"2018-07-24T12:05:51Z","closed_at":null,"author_association":"NONE","body":"I am using vega in kibana. I try to access nested json field but I cannot able to access that field, could anyone help me to resolve this issue. I attach my vega json and index name is pie\r\n\r\nindex data sample:\r\n\r\n{ \"_index\": \"pie\", \"_type\": \"flare\", \"_id\": \"2\", \"_version\": 1, \"_score\": 1, \"_source\": { \"id\": 2, \"parent\": 1, \"data\" :{ \"memory\": 50 } } }\r\n\r\n\r\n`\r\n\r\n    Home / Community Help / \r\n\r\nYour question was successfully posted!\r\navatar image\r\nHow to access nested json in vega\r\nQuestion by Narasimma varman 21 secs ago elasticsearchkibanalogstash\r\n\r\nI am using vega in kibana. I try to access nested json field but I cannot able to access that field, could anyone help me to resolve this issue. I attach my vega json and index name is pie\r\n\r\nindex data sample:\r\n\r\n{ \"_index\": \"pie\", \"_type\": \"flare\", \"_id\": \"2\", \"_version\": 1, \"_score\": 1, \"_source\": { \"id\": 2, \"parent\": 1, \"data\" :{ \"memory\": 50 } } }\r\n\r\n    {\r\n    \"$schema\": \"https://vega.github.io/schema/vega/v3.json\",\r\n    \"data\": [\r\n    {\r\n    \"name\": \"table\",\r\n    \"url\": {\r\n     \r\n    \"%context%\": \"true\",\r\n     \r\n     \"index\": \"pie*\",\r\n     \r\n     \"body\": {\r\n     \r\n      \"size\": \"10\"\r\n     \r\n     \r\n     }\r\n     },\r\n     \r\n    \"format\": { \"property\": \"hits.hits\" },\r\n     \r\n    \"transform\": [\r\n     {\r\n      \"type\": \"formula\",\r\n      \"expr\": \"toNumber(datum[\\\"_source\\\"][\\\"data\\\"][\\\"memory\\\"])\",\r\n      \"as\": \"memory\"\r\n        }\r\n          ],\r\n     \"transform\": [{\"type\": \"pie\", \"field\": \"memory\"}]\r\n     }  ],\r\n     \r\n      \"scales\": [\r\n       {\r\n     \"name\": \"r\",\r\n      \"type\": \"sqrt\",\r\n      \"domain\": {\"data\": \"table\", \"field\": \"memory\"},\r\n     \"zero\": true,\r\n     \"range\": [20, 100]\r\n         }\r\n       ],\r\n     \r\n     \"marks\": [\r\n    {\r\n     \"type\": \"arc\",\r\n      \"from\": {\"data\": \"table\"},\r\n      \"encode\": {\r\n       \"enter\": {\r\n        \"x\": {\"field\": {\"group\": \"width\"}, \"mult\": 0.5},\r\n      \"y\": {\"field\": {\"group\": \"height\"}, \"mult\": 0.5},\r\n      \"startAngle\": {\"field\": \"startAngle\"},\r\n      \"endAngle\": {\"field\": \"endAngle\"},\r\n      \"innerRadius\": {\"value\": 20},\r\n      \"outerRadius\": {\"scale\": \"r\", \"field\": \"memory\"},\r\n      \"stroke\": {\"value\": \"#fff\"}\r\n    },\r\n    \"update\": {\r\n      \"fill\": {\"value\": \"#ccc\"}\r\n    },\r\n    \"hover\": {\r\n      \"fill\": {\"value\": \"skyblue\"}\r\n    }\r\n      }\r\n       },\r\n     \r\n    {\r\n     \"type\": \"text\",\r\n     \"from\": {\"data\": \"table\"},\r\n    \"encode\": {\r\n    \"enter\": {\r\n      \"x\": {\"field\": {\"group\": \"width\"}, \"mult\": 0.5},\r\n      \"y\": {\"field\": {\"group\": \"height\"}, \"mult\": 0.5},\r\n      \"radius\": {\"scale\": \"r\", \"field\": \"memory\", \"offset\": 8},\r\n      \"theta\": {\"signal\": \"(datum.startAngle + datum.endAngle)/2\"},\r\n      \"fill\": {\"value\": \"#000\"},\r\n      \"align\": {\"value\": \"center\"},\r\n      \"baseline\": {\"value\": \"middle\"},\r\n      \"text\": {\"field\": \"memory\"}\r\n     }\r\n    }\r\n    }\r\n    ]     \r\n      }`"},"comment":{"url":"https://api.github.com/repos/vega/vega/issues/comments/407382346","html_url":"https://github.com/vega/vega/issues/1371#issuecomment-407382346","issue_url":"https://api.github.com/repos/vega/vega/issues/1371","id":407382346,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzM4MjM0Ng==","user":{"login":"varmatangoit","id":40787508,"node_id":"MDQ6VXNlcjQwNzg3NTA4","avatar_url":"https://avatars1.githubusercontent.com/u/40787508?v=4","gravatar_id":"","url":"https://api.github.com/users/varmatangoit","html_url":"https://github.com/varmatangoit","followers_url":"https://api.github.com/users/varmatangoit/followers","following_url":"https://api.github.com/users/varmatangoit/following{/other_user}","gists_url":"https://api.github.com/users/varmatangoit/gists{/gist_id}","starred_url":"https://api.github.com/users/varmatangoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varmatangoit/subscriptions","organizations_url":"https://api.github.com/users/varmatangoit/orgs","repos_url":"https://api.github.com/users/varmatangoit/repos","events_url":"https://api.github.com/users/varmatangoit/events{/privacy}","received_events_url":"https://api.github.com/users/varmatangoit/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T12:05:51Z","updated_at":"2018-07-24T12:05:51Z","author_association":"NONE","body":"Thanks, @mattijn  lot it works fine"}}
{"actor":{"display_login":"varmatangoit"}}