2
How to transform this Object array from td's
localidades = "<td style='white-space: nowrap;'>Sto.amaro</td><td style='white-space: nowrap;'>Osasco</td><td style='white-space: nowrap;'>Lapa</td><td style='white-space: nowrap;'>Osasco Ii</td><td style='white-space: nowrap;'>Sao Miguel</td><td style='white-space: nowrap;'>Pirituba</td><td style='white-space: nowrap;'>Santana</td>";
then I use
console.log($(localidades).text(''));
and it returns me this array below
[<td style="white-space: nowrap;"></td>, <td style="white-space: nowrap;"></td>, <td style="white-space: nowrap;"></td>, <td style="white-space: nowrap;"></td>, <td style="white-space: nowrap;"></td>, <td style="white-space: nowrap;"></td>, <td style="white-space: nowrap;"></td>]
I would like to turn this array back to string only with empty tds as in the string below
"<td style='white-space: nowrap;'></td><td style='white-space: nowrap;'></td><td style='white-space: nowrap;'></td><td style='white-space: nowrap;'></td><td style='white-space: nowrap;'></td><td style='white-space: nowrap;'></td><td style='white-space: nowrap;'></td>"
The first array is valid (afaik), so there is no way. Unless it is an array of references to DOM elements. Proceed?
– Vinícius Gobbo A. de Oliveira
Did you manage to solve this question?
– Sergio