Problem to append 3 Arrays

Hi all,

my question are a little stupid, i want do something like this:

`dataT=[1]; //is this the best way to declare one array?
dataT.clear();
for(i=0; i<3; i++){
data = imp.scanwifinetworks();

dataT.extend(data);
}
`

My doubt are on the way to declare the array, becausa de result of this code does not seem right.

I have some server.log and the result the data is:

2014-04-17 20:50:54 UTC+1: [Device] SSID: WireMaia
2014-04-17 20:50:54 UTC+1: [Device] BSSID: 002417d85828
2014-04-17 20:50:54 UTC+1: [Device] RSSI: -54
2014-04-17 20:50:55 UTC+1: [Device] SSID: WireMaia
2014-04-17 20:50:55 UTC+1: [Device] BSSID: 002417d85828
2014-04-17 20:50:55 UTC+1: [Device] RSSI: -54
2014-04-17 20:50:55 UTC+1: [Device] SSID: WireMaia
2014-04-17 20:50:55 UTC+1: [Device] BSSID: 002417d85828
2014-04-17 20:50:55 UTC+1: [Device] RSSI: -52

and the result of the dataT is:

2014-04-17 20:50:56 UTC+1: [Device] SSID: WireMaia
2014-04-17 20:50:56 UTC+1: [Device] BSSID: 002417d85828
2014-04-17 20:50:56 UTC+1: [Device] RSSI: -54
2014-04-17 20:50:56 UTC+1: [Device] SSID: WireMaia
2014-04-17 20:50:56 UTC+1: [Device] BSSID: 002417d85828
2014-04-17 20:50:56 UTC+1: [Device] RSSI: -52
2014-04-17 20:50:56 UTC+1: [Device] SSID: WireMaia
2014-04-17 20:50:56 UTC+1: [Device] BSSID: 002417d85828
2014-04-17 20:50:56 UTC+1: [Device] RSSI: -51

ie, what I’m putting into the datat is not correct. The value of the RSSI varies.

Solved!

I was printing the wrong place.

What was the server.log syntax you used to extract the SSID, BSSDI, etc?
Thanx

RSSI will vary over time; every scan will likely give a different RSSI value.

I aamagine-admin,

you can print the SSID, BSSID, etc this way:

data = imp.scanwifinetworks(); foreach (idx,val in data) { ssid = data[idx].ssid; bssid = data[idx].bssid; rssi = data[idx].rssi; }

I Hugo, i know that RSSI vary over time.

The problem was that there i was a print in the wrong place.

First i copy the content of the data to dataT, but how i was the print in the wrong place values ​​were not giving me correct.