0
I have the following structure:
[{tabela: 'tabela1', coluna: 'coluna1'}, {tabela: 'tabela2', coluna: 'coluna2'}]
I need to insert this data into a div
in format:
[TABLE.COLUMN]
In case it would:
[Tabela1.coluna1] [table2.coluna2]
But I’m not finding a solution to this with jQuery
. How could I do that ?
"Get item from an array with jQuery", no need even jQuery:
object...[...]
, this is the same as indexing an object with the.
, but computably. There are several ways to traverse an array, among them the best is to memorize its size and increment a temporary index to a certain limit. You can also scroll through the array directly like this:for (var i = 0, item; (item = array[i++]) !== undefined;)
, a loop that breaks until an item arrivesundefined
.– Klaider
In your case you would only need to go through the items of your
Array
– Klaider