Rella
Rella

Reputation: 66935

How to pass to JS such array of such objects?

So I need to pass to my script an array of such arrays [name, width, height] and be capable to iterate through such array. In what format, how should my server response and how to request(my server can response on any Http and tcp request in any required form.) So I am in search for easiest in implementing on js side. But I can not use any special JS libs like Jquery. (as I said server can form any kind of TCP and HTTP response.)

So how should look my response to pass such array of arrays to JS and how to read it using JS?

Upvotes: 1

Views: 93

Answers (2)

Ionuț G. Stan
Ionuț G. Stan

Reputation: 179109

Use JSONP.

Upvotes: 2

Peter Bailey
Peter Bailey

Reputation: 105878

Just return JSON

Upvotes: 2

Related Questions