javascript - How to select only certain JSON Keys -
With a web socket call, I will explain the responses of different JSON formats as a response to the bottom
First JSON This is my web site HTML program Please tell me to keep a condition that it only prints the "AS" key. ; Pars = JSON.parse (theData); for (i = 0; i this has not been tested , So let me know that this does not work in the comment.
starts with a second "SD" starting with an "AS" Second [JSON] Strong>
I'm trying to debug and [ddl] to see it A. That's what I get, so I want to print only "AS" (first JSON has been shown)
Function testWebSocket () {websocket = New websitet (wsUri); Websocket.onopen = function (evt) {on open (evt)}; Websocket.onclose = function (evt) {onClose (evt)}; Websocket.onmessage = function (evt) {onMessage (evt)}; Websocket.onerror = function (evt) {onError (evt)}; } Function on message (evt) {evt.data [1] writeToScreen ('& lt; span style = "color: blue;" & gt;' + evt.data + '& lt; / span & gt;'); }
Comments
Post a Comment