{"action":"created","issue":{"url":"https://api.github.com/repos/donnie4w/json4g/issues/3","repository_url":"https://api.github.com/repos/donnie4w/json4g","labels_url":"https://api.github.com/repos/donnie4w/json4g/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/donnie4w/json4g/issues/3/comments","events_url":"https://api.github.com/repos/donnie4w/json4g/issues/3/events","html_url":"https://github.com/donnie4w/json4g/issues/3","id":189630155,"number":3,"title":"How may I use SetValue for []JsonNode","user":{"login":"alanywlee","id":6228044,"avatar_url":"https://avatars.githubusercontent.com/u/6228044?v=3","gravatar_id":"","url":"https://api.github.com/users/alanywlee","html_url":"https://github.com/alanywlee","followers_url":"https://api.github.com/users/alanywlee/followers","following_url":"https://api.github.com/users/alanywlee/following{/other_user}","gists_url":"https://api.github.com/users/alanywlee/gists{/gist_id}","starred_url":"https://api.github.com/users/alanywlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanywlee/subscriptions","organizations_url":"https://api.github.com/users/alanywlee/orgs","repos_url":"https://api.github.com/users/alanywlee/repos","events_url":"https://api.github.com/users/alanywlee/events{/privacy}","received_events_url":"https://api.github.com/users/alanywlee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-16T08:36:38Z","updated_at":"2016-11-16T09:18:05Z","closed_at":null,"body":"---------\r\n\r\n    {\r\n        \"arrays\":[\r\n            {\"text\": \"123\"},\r\n            {\"text\": \"456\"},\r\n            {\"text\": \"789\"}\r\n        ]\r\n    }\r\n---------\r\n\r\nI want to compose a json object like above, However, using []JsonNode to SetValue([]JsonNode) seems not working. It didn't return error but always got nothing. Are there any standard way to make json node array work?"},"comment":{"url":"https://api.github.com/repos/donnie4w/json4g/issues/comments/260894200","html_url":"https://github.com/donnie4w/json4g/issues/3#issuecomment-260894200","issue_url":"https://api.github.com/repos/donnie4w/json4g/issues/3","id":260894200,"user":{"login":"alanywlee","id":6228044,"avatar_url":"https://avatars.githubusercontent.com/u/6228044?v=3","gravatar_id":"","url":"https://api.github.com/users/alanywlee","html_url":"https://github.com/alanywlee","followers_url":"https://api.github.com/users/alanywlee/followers","following_url":"https://api.github.com/users/alanywlee/following{/other_user}","gists_url":"https://api.github.com/users/alanywlee/gists{/gist_id}","starred_url":"https://api.github.com/users/alanywlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanywlee/subscriptions","organizations_url":"https://api.github.com/users/alanywlee/orgs","repos_url":"https://api.github.com/users/alanywlee/repos","events_url":"https://api.github.com/users/alanywlee/events{/privacy}","received_events_url":"https://api.github.com/users/alanywlee/received_events","type":"User","site_admin":false},"created_at":"2016-11-16T09:18:05Z","updated_at":"2016-11-16T09:18:05Z","body":"--------------\r\n\r\n    func main(){\r\n        str := \"{\\\"words\\\":[{\\\"text\\\":\\\"123\\\"},{\\\"text\\\":\\\"456\\\"}]}\"\r\n\r\n        node2 := new(j4g.JsonNode)\r\n        node2.Name = \"newword\"\r\n        node, err := j4g.LoadByString(str)\r\n        if err != nil {\r\n            fmt.Print(\"json4g.LoadByString()\", str, \"\\n\", err)\r\n        }else{\r\n            node2.SetValue(node.GetNodeByName(\"words\"))\r\n        }\r\n\r\n        fmt.Println(node2.ToString())\r\n    }\r\n--------------\r\n\r\nI also made another try using above code, and found output nothing like this:\r\n\r\n----------\r\n\r\n    \"newword\":{}\r\n----------\r\n\r\nDid I do anything wrong, or are there any other way to make node array work?"}}
{"actor":{"display_login":"alanywlee"}}