Hi,
I want to save msg.keyID from a request, which returns more than 1 times. I think a picture maybe good to demonstrate.
One time request return these value..
and here is my currently code
[{"id":"e2a6bf49.da7258","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"ad06247.c845bd8","type":"ui_button","z":"e2a6bf49.da7258","name":"GET Keys","group":"b8575647.ebefb","order":6,"width":0,"height":0,"passthru":false,"label":"GET DEFINED OBJECTS","tooltip":"","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"num","topic":"","x":70,"y":160,"wires":[["fc127236.89ff4"]]},{"id":"fc127236.89ff4","type":"function","z":"e2a6bf49.da7258","name":"GET Keys","func":"return {payload : \"KEYS *\"};\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":230,"y":160,"wires":[["b260546d.7c5e1"]]},{"id":"b260546d.7c5e1","type":"http request","z":"e2a6bf49.da7258","name":"Get Keys","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://localhost:9851/{{payload}}","tls":"","persist":false,"proxy":"","authType":"","x":380,"y":160,"wires":[["eccbf81f.7a8508"]]},{"id":"eccbf81f.7a8508","type":"function","z":"e2a6bf49.da7258","name":"Response","func":"var definedKeys = msg.payload.keys;\nreturn {payload : definedKeys};\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":160,"wires":[["31658d6b.039eca"]]},{"id":"ee088fb8.f544b","type":"http request","z":"e2a6bf49.da7258","name":"HTTP GET REQUEST","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://localhost:9851/{{payload}}","tls":"","persist":false,"proxy":"","authType":"","x":460,"y":300,"wires":[["3741ec9.6c07394"]]},{"id":"3741ec9.6c07394","type":"debug","z":"e2a6bf49.da7258","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":240,"wires":[]},{"id":"31658d6b.039eca","type":"split","z":"e2a6bf49.da7258","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":110,"y":300,"wires":[["25cfb7bd.8a95b8"]]},{"id":"25cfb7bd.8a95b8","type":"function","z":"e2a6bf49.da7258","name":"","func":"msg.keyID = msg.payload;\nmsg.payload = 'SCAN%20'+msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":280,"y":300,"wires":[["ee088fb8.f544b"]]},{"id":"dac2dc01.50f688","type":"ui_text","z":"e2a6bf49.da7258","group":"b8575647.ebefb","order":1,"width":0,"height":0,"name":"","label":"KeyID","format":"{{msg.keyID}}","layout":"row-spread","x":640,"y":740,"wires":[]},{"id":"18cb72ac.e7224d","type":"ui_text","z":"e2a6bf49.da7258","group":"b8575647.ebefb","order":2,"width":0,"height":0,"name":"","label":"Position","format":"{{msg.payload}}","layout":"row-spread","x":650,"y":820,"wires":[]},{"id":"bc020133.4241d","type":"json","z":"e2a6bf49.da7258","name":"","property":"payload","action":"","pretty":false,"x":310,"y":680,"wires":[[]]},{"id":"b8575647.ebefb","type":"ui_group","z":"","name":"Default","tab":"d9869613.8ce11","order":1,"disp":true,"width":"6","collapse":false},{"id":"d9869613.8ce11","type":"ui_tab","z":"","name":"Case 10: Get all defined objects","icon":"dashboard","order":10,"disabled":false,"hidden":false}]
Thanks in advance.