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

  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)  

This is my web site HTML program

  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;'); }   

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.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -