Update correct instances

Cas de Reuver cas at reuver.co
Tue Oct 17 04:58:43 EDT 2017


Hi Sergio,

> On 17 Oct 2017, at 10:54, Sergio Fernández <sergio19932 at gmail.com> wrote:
> And when trying to 
> 
> let wanid = declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*", {value: 1}).value[0];
> log(wanid);
> 
> logging an error: faultMessage="Cannot read property '0' of undefined"

Try the following:

let wanid = declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*", {value: 1});
console.log(wanid[0]);

According to the wiki (https://github.com/zaidka/genieacs/wiki/Virtual-Parameters), getting the value the way you want works like this:

console.log(wanid[0].value[0]);

-- 
Cas de Reuver
http://cas.reuver.co



More information about the Users mailing list