4

Tenho como saida uma string com o seguinte formato.

[["link"],["<iframe id='player' type='text/html' width='452' height='272' src='http://www2.camara.leg.br/camaranoticias/tv/embedAoVivo.html?width=450&height=253'  frameborder='0'></iframe>"]]

Ela representa um datatable. Eu quero acessar o segundo elemento. Se possível como array em jquery. Alguém poderia dar uma dica?

1 Resposta 1

2

Jquery é Javascript, logo você pode acessar normalmente via []

var x = [["link"],["<iframe id='player' type='text/html' width='452' height='272' src='http://www2.camara.leg.br/camaranoticias/tv/embedAoVivo.html?width=450&height=253'  frameborder='0'></iframe>"]];

alert(x[0]);
alert(x[1]);

http://jsfiddle.net/m8zzgrr5/

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .