Transforming a datatable into array with jquery

4

I have as output a string with the following format.

[["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>"]]

It represents a datatable. I want to access the second element. If possible as array in jquery. Could anyone give a tip?

    
asked by anonymous 14.12.2015 / 04:47

1 answer

2

Jquery is Javascript, so you can usually access 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]);

link

    
14.12.2015 / 11:25